kath
New Member
Hi guys
I'm hoping you can help me. I've very new to VBA (I started yesterday). I have a excel spreadsheet that produces a report from a number of various other sheets within the same document.
What I want to do is create a macro that once it runs, produces a PDF of each report and saves it as its individual ticker # name with the date and then runs the next report in the list, saving the following report as a PDF with its individual ticker # name and date, until the drop-down list of names is completed.
I have got this far with my macro (producing the report as a PDF and the ticker name automatically populates the 'save as' option as the individual reports ticker name). After this I'm stuck.
can anyone help me please?
cheers
Kath
I'm hoping you can help me. I've very new to VBA (I started yesterday). I have a excel spreadsheet that produces a report from a number of various other sheets within the same document.
What I want to do is create a macro that once it runs, produces a PDF of each report and saves it as its individual ticker # name with the date and then runs the next report in the list, saving the following report as a PDF with its individual ticker # name and date, until the drop-down list of names is completed.
I have got this far with my macro (producing the report as a PDF and the ticker name automatically populates the 'save as' option as the individual reports ticker name). After this I'm stuck.
can anyone help me please?
cheers
Kath
Code:
Sub CreatePDFReport()
pdfName = ActiveSheet.Range("G3")
ChDir "C:\Users\Katharine\Dropbox (Remerga)\Research\Company Research\Company Reports Kath Test\" 'This is where youo set a defult file path.
fileSaveName = Application.GetSaveAsFilename(pdfName, _
fileFilter:="PDF Files (*.pdf), *.pdf")
If fileSaveName <> False Then
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
fileSaveName _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True
End If
End Sub