I cant figure out how to get a sub to
'Here is what I have:
Sub ExportDeptOneKPI
CallKPIPrint ("Dept One")
End Sub
'This calls the below but how do I get the name in the spot with the ???????:
SubKPIPrint (PDFPrint as String)
Worksheets (PDFPrint).ExportAsFixedFormat Type:=xlTypePDF, Filename:= "C:\DEPARTMENTS\DATA\???????.pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= False
End Sub
'the Export Sub then runs for Dept Two, Three etc.
Do I need to set the whole filename as a string before putting it into the export part of the code?
If you have an solution or alternate idea it would be much appreciated.
Also I would like this to all happen without actually calling up the sheets (they are all hidden).
thanks
'Here is what I have:
Sub ExportDeptOneKPI
CallKPIPrint ("Dept One")
End Sub
'This calls the below but how do I get the name in the spot with the ???????:
SubKPIPrint (PDFPrint as String)
Worksheets (PDFPrint).ExportAsFixedFormat Type:=xlTypePDF, Filename:= "C:\DEPARTMENTS\DATA\???????.pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= False
End Sub
'the Export Sub then runs for Dept Two, Three etc.
Do I need to set the whole filename as a string before putting it into the export part of the code?
If you have an solution or alternate idea it would be much appreciated.
Also I would like this to all happen without actually calling up the sheets (they are all hidden).
thanks