vbanovice2701
New Member
- Joined
- Jun 23, 2022
- Messages
- 2
- Office Version
- 365
- Platform
- MacOS
Hi,
I am trying to save a file as a PDF based on a particular cell value. The below macro appears to work once only, then it seems to want to print. Can someone please help, I am going round in circles with different coding
Sub SavePDF()
'
' SavePDF Macro
Dim file As String
Sheets("XXX").Activate
file = Cells(16, 13).Text
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
FileName:="/office/XXX/" & file
End Sub
I am trying to save a file as a PDF based on a particular cell value. The below macro appears to work once only, then it seems to want to print. Can someone please help, I am going round in circles with different coding
Sub SavePDF()
'
' SavePDF Macro
Dim file As String
Sheets("XXX").Activate
file = Cells(16, 13).Text
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
FileName:="/office/XXX/" & file
End Sub