Hello,
I have Excel 2010 and I have a macro on each of six sheets in a workbook. The macro exports the contents of the sheet to a PDF file with a designated name and file location. The issue I'm having is that to get to each sheet to run each macro I have to go to a welcome screen, select a user name, and enter their password and then run the macro on that screen. This is time consuming and inelegant. I need another macro on the welcome screen which I can click to run all of the other macros. I thought about running another macro to go through each of the steps above but its far too much work for too little payoff.
Here is the code which resulted from each of the macro record sessions.
Sub Amy_ExceltoPDF()
'
' Amy_ExceltoPDF Macro
'
' Keyboard Shortcut: Ctrl+Shift+J
'
ChDir "V:\Arizona CSRs\Dashboard\Team PDFs"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"V:\Arizona CSRs\Dashboard\Team PDFs\Amy.pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True
End Sub
Sub Chad_ExcelToPDF()
'
' Chad_ExcelToPDF Macro
'
' Keyboard Shortcut: Ctrl+Shift+L
'
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"V:\Arizona CSRs\Dashboard\Team PDFs\Chad.pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True
End Sub
Sub David_ExcelToPDF()
'
' David_ExcelToPDF Macro
'
' Keyboard Shortcut: Ctrl+Shift+M
'
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"V:\Arizona CSRs\Dashboard\Team PDFs\David.pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True
End Sub
Sub Danielle_ExcelToPDF()
'
' Danielle_ExcelToPDF Macro
'
' Keyboard Shortcut: Ctrl+Shift+G
'
ChDir "V:\Arizona CSRs\Dashboard\Team PDFs"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"V:\Arizona CSRs\Dashboard\Team PDFs\Danielle.pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub
Sub Brianna_ExcelToPDF()
'
' Brianna_ExcelToPDF Macro
'
' Keyboard Shortcut: Ctrl+Shift+A
'
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"V:\Arizona CSRs\Dashboard\Team PDFs\Brianna.pdf", Quality:=xlQualityStandard _
, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
End Sub
Sub Rachel_ExcelToPDF()
'
' Rachel_ExcelToPDF Macro
'
' Keyboard Shortcut: Ctrl+Shift+B
'
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"V:\Arizona CSRs\Dashboard\Team PDFs\Rachel.pdf", Quality:=xlQualityStandard _
, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= True
End Sub
Bookmarks