+ Reply to Thread
Results 1 to 4 of 4

Need help correcting the macro for Saving sheets as PDFs

  1. #1
    Registered User
    Join Date
    07-14-2016
    Location
    Bangalore, India
    MS-Off Ver
    2013
    Posts
    28

    Need help correcting the macro for Saving sheets as PDFs

    I'm new to VBA and stuck at a point where I need to save 2 sheets in a single PDF.

    I tried this, but it fails.

    Please Login or Register  to view this content.
    Please help me correct this!

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Need help correcting the macro for Saving sheets as PDFs

    Wasn't this answered in your previous post?

    http://www.excelforum.com/showthread...=1#post4441375
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Need help correcting the macro for Saving sheets as PDFs

    Try this.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Registered User
    Join Date
    07-14-2016
    Location
    Bangalore, India
    MS-Off Ver
    2013
    Posts
    28

    Re: Need help correcting the macro for Saving sheets as PDFs

    It works partially here! It is also taking Sheet3 into consideration to save as PDF.

    Another problem is that it is not hiding the columns C:G when it is generating the PDF.

    How do I avoid that?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Existing User Form & Code: Need help with corrections on saving sheets as PDFs
    By anshul1719 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-25-2016, 03:43 AM
  2. looping through folders - saving xls files as PDFs
    By Hugh Jass in forum Excel General
    Replies: 1
    Last Post: 05-11-2016, 06:06 PM
  3. looping through folders - saving xls files as PDFs
    By Hugh Jass in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2016, 06:06 PM
  4. VBA export sheets as PDFs, merge with existing PDFs
    By wannabeexcelguy in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-26-2015, 07:32 PM
  5. Saving as PDFs, but individually....
    By luke1234567 in forum Excel General
    Replies: 1
    Last Post: 11-19-2014, 06:25 AM
  6. Saving Multiple Sheets as Separate PDFs
    By csun in forum Excel General
    Replies: 1
    Last Post: 01-09-2014, 09:54 PM
  7. Saving Worksheet as different pdfs
    By manny_cb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2009, 03:49 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1