I have a macro that creates a single PDF file of several worksheets of a workbook and saves it in a folder selected by the user. The array of worksheets varies according to an initial selection by the user.
The arrays of sheet names to be included in the PDF are maintained in tables inside the workbook. Once the sheet names are selected as an array they are saved as a single document using the ExportAsFixedFormat VBA command. The macro is run by different users - some using Excel 2010 for Windows and some using Excel 2011 for Mac. The macro works fine on Excel 2010. On Excel for Mac, although the array of sheet names is created correctly only the last sheet in the array is saved in the selected folder.
Visual Basic Classic. Sub PrintSheetsToPDF2() pdfName = ActiveSheet.Name ChDir ActiveWorkbook.Path & ' ' fileSaveName = ActiveSheet.Name ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _ fileSaveName _, Quality:=xlQualityStandard, IncludeDocProperties. In Mac Excel 2016, you can no longer do this. Please bring that functionality back. Note that this is different than the 'Form' option on the Data menu. If you meant to vote for the Data Form, which is different than VBA UserForms, please change your vote to that suggestion instead.
![Vba Vba](/uploads/1/2/5/5/125533119/104961539.jpg)
Here is the relevant portion of the code. Code: Sub ChooseMacFolder(strPath) Dim folderPath As String Dim RootFolder As String On Error Resume Next RootFolder = MacScript('return (path to desktop folder) as String') 'Or use RootFolder = 'Macintosh HD:Users:mvp:Desktop:TestMap:' folderPath = MacScript('(choose folder with prompt 'Select the folder' default location alias ' & RootFolder & ') as string') On Error GoTo 0 If folderPath ' Then strPath = folderPath End If End SubAnyone have any idea why the sheet array doesn't get selected (or saved) correctly on Excel for Mac? We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity. We may share certain information about our users with our advertising and analytics partners. For additional details, refer to our.
![Mac 2016 Excel Vba Parameters For Activesheet.exportasfixedformat Mac 2016 Excel Vba Parameters For Activesheet.exportasfixedformat](/uploads/1/2/5/5/125533119/481769878.gif)
By clicking ' I AGREE' below, you agree to our and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.