Hello again,
Got myself in a right muddle with a command button. All i want it to do is generate the pre populated form on sheet8 as a PDF, then open it. I tried this code:
I tried to do it with and without the names eg:
I get either a "Syntax error" or an "Expected expression". I have written this entire program as a complete newbie to code, and really appreciate all the help i have had from this site. So thank you in advance!
Got myself in a right muddle with a command button. All i want it to do is generate the pre populated form on sheet8 as a PDF, then open it. I tried this code:
Code:
Sub ExportAsFixedFormat()
Type As XlFixedFormatType
Filename As Object
Quality As Object
IncludeDocProperties As Object
IgnorePrintAreas As Object
From As Object
To As Object
OpenAfterPublish As Object
FixedFormatExtClassPtr As Object
End Sub
Private Sub CommandButton8_Click()
Dim ws As Worksheet
Set ws = Sheet8
ws.ExportAsFixedFormat (XlFixedFormatType.xlTypePDF, Filename:= "ON", , , , , ,OpenAfterPublish:= TRUE, ,)
End Sub
I tried to do it with and without the names eg:
Code:
ws.ExportAsFixedFormat (XlFixedFormatType.xlTypePDF, ON, , , , , , TRUE, ,)
I get either a "Syntax error" or an "Expected expression". I have written this entire program as a complete newbie to code, and really appreciate all the help i have had from this site. So thank you in advance!