sassriverrat
Well-known Member
- Joined
- Oct 4, 2018
- Messages
- 655
Good Morning, I'm trying to save a file (that's a pdf) by reading a file from one spot and saving as to another. My code is kicking an "invalid qualifier" on this section of code below and I'm not sure how to better rewrite. Thanks.
section kicked
section kicked
Code:
TempFileNEW.SaveAs Filename:=LocalFilePath, FileFormat:=xlTypePDF
Code:
Dim Folder0 As String
Dim TempFolderOLD As String
Dim TempFileNEW As String
With Sheets("Setup")
Folder0 = .Range("B5") 'temp file
Folder1 = .Range("B7") 'permanent file
End With
LocalFilePath = Environ("Userprofile") & "\" & Folder1 & "\" & Namer & ".pdf"
tstamp = Format(Now, "mm-dd-yyyy")
TempFolderOLD = Environ("Userprofile") & "\" & Folder0
TempFileNEW = TempFolderOLD & tstamp & "\" & Namer & ".pdf"
TempFileNEW.SaveAs Filename:=LocalFilePath, FileFormat:=xlTypePDF