Excel for mac vba to copy a sheet without command button

broken image

'Create and assign variables Dim saveLocation As String The following code saves the selected sheets as a single PDF. From a VBA perspective, it is the ExportAsFilxedFormat method combined with the Type property set to xlTypePDF that creates a PDF. This section contains the base code to save Excel as PDF from different objects (workbooks, worksheets, ranges and charts).

broken image

Saving Excel workbooks, sheets, charts and ranges as PDF.