Hello,
i was wondering if someone can helpme out
i use this code to make an pdf file from the selected cells
but when i run it from workbook_open()Private Sub Workbook_Open() On Error GoTo Print_Error Sheet3.Select mySheets = Array("sheetlist") Application.PrintCommunication = False For Each sh In mySheets Sheets(sh).PageSetup.Orientation = xlLandscape Sheets(sh).PageSetup.FitToPagesTall = 0 Next Application.PrintCommunication = True 'Selection.CurrentRegion.Select Range(ActiveCell, ActiveCell.End(xlDown).End(xlToRight)).Select Selection.ExportAsFixedFormat xlTypePDF, fileName:= _ "C:\Page1", Openafterpublish:=True Print_Error: MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure PrintFile of " & m_ProjectName Exit Sub End Sub
it gives me an empty page?
any solutions please.
Thanks