Jyggalag
Active Member
- Joined
- Mar 8, 2021
- Messages
- 445
- Office Version
- 365
- 2019
- Platform
- Windows
Hi all,
I currently have a macro that saves my sheet as a PDF, however when I try to do this, it brings me this error:
If I debug it highlights this in my VBA code:
The code is this:
Can somebody help me fix this issue please? Would be much appreciated!
I currently have a macro that saves my sheet as a PDF, however when I try to do this, it brings me this error:
If I debug it highlights this in my VBA code:
The code is this:
VBA Code:
Option Explicit
Sub SaveFileWithMacro()
Dim Path As String
Dim fn As String
Path = "R:Path\PDF files\"
fn = Range("A39")
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=Path & fn & ".pdf"
End Sub
Can somebody help me fix this issue please? Would be much appreciated!