Hello.
So I am trying to create a macro that when the button on the sheet is pressed that specific sheet (not the whole workbook) will save as a pdf with the name "Initial Delivery Check dd-mm-yyyy hh-mm-ss"
I am not sure how to add the date and time to the name. I want the sheet to save as a new name each time so it does not override the previous copy. My current set up doesn't have date and time in the name so it just overwrites the previous version. I have looked through a lot of other examples and I can never get it to quite work for my set up.
My current VBA Code:
Sub CreatePDFSheet()
Sheet1.ExportAsFixedFormat xlTypePDF, Environ("Userprofile") & "\INSERT COMPANY FOLDERS HERE\Forms\Completed Forms\Initial Delivery Check.pdf"
End Sub
So I am trying to create a macro that when the button on the sheet is pressed that specific sheet (not the whole workbook) will save as a pdf with the name "Initial Delivery Check dd-mm-yyyy hh-mm-ss"
I am not sure how to add the date and time to the name. I want the sheet to save as a new name each time so it does not override the previous copy. My current set up doesn't have date and time in the name so it just overwrites the previous version. I have looked through a lot of other examples and I can never get it to quite work for my set up.
My current VBA Code:
Sub CreatePDFSheet()
Sheet1.ExportAsFixedFormat xlTypePDF, Environ("Userprofile") & "\INSERT COMPANY FOLDERS HERE\Forms\Completed Forms\Initial Delivery Check.pdf"
End Sub