Is there a way to combine this code into one big button. I had one before that called each macro but it stopped working for some reason
Here is the code that quit working
I looking to create a separte email button as well as add it into the big code as well because some of my pdf i just print and some I email and print
Code:
Sub SavePDF() Dim strFileName As String
Dim UserName As String
UserName = VBA.Environ$("username")
strFileName = Range("A52")
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:="C:\Users\" & Environ("Username") & "\Google Drive\Customer Bills\" & strFileName
MyPrint
End
End Sub
Sub SaveExcel()
Dim strFileName As String
Dim UserName As String
UserName = VBA.Environ$("username")
strFileName = Range("A52")
ActiveWorkbook.saveas Filename:="C:\Users\" & Environ("Username") & "\Google Drive\Customer Bills\" & strFileName, FileFormat:= _
xlOpenXMLWorkbookMacroEnabled
SavePDF
End
End Sub
Sub MyPrint()
ActiveSheet.PrintOut
End Sub
Here is the code that quit working
Code:
Sub AllMacros()SaveExcel
MyPrint
SavePDF
End Sub
I looking to create a separte email button as well as add it into the big code as well because some of my pdf i just print and some I email and print