• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Saving hidden worksheet in pdf with specific range

Hi,

Please help me with my excel problem:

I have a vba script that works fine, however, I don't know where in my script should I define the range so that it will not generate more than one page:

===========================================
Sub SaveinPDF_Click()

Dim iVis As XlSheetVisibility

fname = Application.GetSaveAsFilename("", "PDF Files (*.pdf), *.pdf")

With Worksheets("SubscriptionForm")
iVis = .Visible
.Visible = xlSheetVisible
.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=PdfFile, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
.Visible = iVis
End With
End Sub
============================================

I .also attached my file for your reference. Appreciate the help please
 

Attachments

  • IG Subscription Form.xlsm
    172.2 KB · Views: 1
Back
Top