steelstorm
10-17-2013, 10:05 AM
Hi All,
I have the below code working fine, but I require a slight modification that I cannot seem to get right.
The workbook has multiple sheets, what I would like to do is use the value located on worksheet "SUMMARY REPORT" cell "B3" to be the name the file is saved as. I've read a few articles on how to name from a cell, but I'm not having any luck naming it from a cell of a specific sheet. My VB skills are still greatly lacking so any help is much appreciated.
Sub PDFTEST()
'
' PDFTEST Macro
'
'
ChDir "C:\Users\phogel\Desktop"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\phogel\Desktop\test.pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True
'change true to false on line above if I do not want it to open pdf after converting
End Sub
I have the below code working fine, but I require a slight modification that I cannot seem to get right.
The workbook has multiple sheets, what I would like to do is use the value located on worksheet "SUMMARY REPORT" cell "B3" to be the name the file is saved as. I've read a few articles on how to name from a cell, but I'm not having any luck naming it from a cell of a specific sheet. My VB skills are still greatly lacking so any help is much appreciated.
Sub PDFTEST()
'
' PDFTEST Macro
'
'
ChDir "C:\Users\phogel\Desktop"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\phogel\Desktop\test.pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True
'change true to false on line above if I do not want it to open pdf after converting
End Sub