Jyggalag
Active Member
- Joined
- Mar 8, 2021
- Messages
- 445
- Office Version
- 365
- 2019
- Platform
- Windows
Hi all,
I currently have this code, which saves my sheet (entitled "Sheet3") as a PDF:
The code is attached to a macro button located in Sheet3 as well.
However, I want to collect all my macro's in one sheet, and I would like to move this particular macro to a new sheet, which I will entitle "Macros". Once I do that however, I do not believe that this code will work, seen as it is using the current sheet I am in and the value A63 in "Sheet3".
Does anybody know of a smart way for me to fix this code? Would be highly appreciated
Kind regards,
Jyggalag
I currently have this code, which saves my sheet (entitled "Sheet3") as a PDF:
VBA Code:
Option Explicit
Sub SaveFileWithMacro()
Dim Path As String
Dim fn As String
Path = "S:\Path\PDF files\"
fn = Range("A63")
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Path & fn & ".pdf"
End Sub
The code is attached to a macro button located in Sheet3 as well.
However, I want to collect all my macro's in one sheet, and I would like to move this particular macro to a new sheet, which I will entitle "Macros". Once I do that however, I do not believe that this code will work, seen as it is using the current sheet I am in and the value A63 in "Sheet3".
Does anybody know of a smart way for me to fix this code? Would be highly appreciated
Kind regards,
Jyggalag