The following code I created is to save the Excel sheet PDF file in a specific folder with a specific filename according to the value of the variables
I would like to know if it is possible to change the code so that the user could save the file in the desired place (such as when downloading an image from the internet) without specifying it beforehand but keeping the file name according to the variable ("MachineName" )
VBA Code:
Dim FilePath As String
Select Case MachineName
Case "A4", "A8.1", "A8.2", "A8.3", "A12.1", "A12.2", "A12.3", "A20.1", "A20.2"
FilePath = Environ("userprofile") & "\Documents\Projeto\" & MachineName & "\"
Sheets("Miter_Registers").Range("A1:AK29").ExportAsFixedFormat Type:=xlTypePDF, Filename:=FilePath & "Miter" & " _ " & MachineName & " _ " & Format(Now(), "dd.mm.yyyy") & " _ " & Format(Now(), "hh.mm") & " _ " & ".pdf" _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
End Select
End Sub
I would like to know if it is possible to change the code so that the user could save the file in the desired place (such as when downloading an image from the internet) without specifying it beforehand but keeping the file name according to the variable ("MachineName" )