user1
user1

Reputation: 37

"Save As" Macro (vba) on mac

I have some code here that I use to save a .pdf file but instead of saving the specific sheet it's saving all the excel sheets. I would like to focus on saving one specific sheet.

Hope you guys can help.

Sub Save_client()
Sheets("Client Form").ExportAsFixedFormat _
Type:=xlTypePDF, Filename:="/Users/"user"/Desktop/" & Range("A2") & Range("B2") & ".pdf"
End Sub

Upvotes: 0

Views: 1260

Answers (1)

braX
braX

Reputation: 11755

Include the From and To arguments: This will export just page 2

  From:=2, To:=2

ExportAsFixedFormat

Upvotes: 1

Related Questions