KlausW
Active Member
- Joined
- Sep 9, 2020
- Messages
- 386
- Office Version
- 2016
- Platform
- Windows
Hi Excel helpers
Is it possible to make this VBA code so that it only stores the tabs I have written in the code. And under a name in cell B, in PDF format.
Is it also possible to make the code so that after saving it will send, using Outlook, to an email address in cell H1.
All help will be appreciated
Klaus W
Is it possible to make this VBA code so that it only stores the tabs I have written in the code. And under a name in cell B, in PDF format.
Is it also possible to make the code so that after saving it will send, using Outlook, to an email address in cell H1.
All help will be appreciated
Klaus W
VBA Code:
Sub Rektangelafrundedehjørner1_Klik()
'Create and assign variables
Dim saveLocation As String
saveLocation = "C:\Users\k-wit\Documents\Rejseafregning\myPDFFile.pdf"
sheetArray = Array("Rejsebeskrivelse", "Koerselsrapport ", "Færgekort", "Billeter")
'Save active workbook as PDF
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=saveLocation
End Sub