+ Reply to Thread
Results 1 to 8 of 8

export sheet as pdf , problem with fitting column and range

  1. #1
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    export sheet as pdf , problem with fitting column and range

    Good morning all
    can advice me for the following code i get from internet that will export sheet name summary to pdf file with name of value from B2
    the problem now is
    i try to change in code to fit range that i need in exported PDF file and print only range A1:C105 or end of row have value instead of C105
    but not working
    the code is
    Please Login or Register  to view this content.

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: export sheet as pdf , problem with fitting column and range

    Please Login or Register  to view this content.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: export sheet as pdf , problem with fitting column and range

    Dear sintek
    thank you so much for your very simple and smart code
    i have some note
    1- its not give message for file present or not , its overwrite without any message
    2- PDF file created have whole range even empty row , can neglect empty row from range

  4. #4
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: export sheet as pdf , problem with fitting column and range

    1- its not give message for file present or not , its overwrite without any message
    If pdf already exists, what must happen?

    2- PDF file created have whole range even empty row , can neglect empty row from range
    Supply sample file and specify exactly what range must be exported...
    See Top Yellow banner regarding sample file...

  5. #5
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: export sheet as pdf , problem with fitting column and range

    1- if already exist , show box say file present if you need to overwrite or to save as with different name
    2-as in attached photo you can see result of file that have empty row printed
    the whole range is A1:C105 but not all the time this range have data sometimes like in attached example have only data till C56 and the rest is empty
    Attached Images Attached Images
    Last edited by mazan2010; 05-29-2021 at 05:03 AM.

  6. #6
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: export sheet as pdf , problem with fitting column and range

    Images mean nothing!!!
    As I said previous post...
    Supply sample file and specify exactly what range must be exported...
    See Top Yellow banner regarding sample file...

  7. #7
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: export sheet as pdf , problem with fitting column and range

    finally i find the error as i find some cell is merged in my file
    than you so much for your help and solution

  8. #8
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: export sheet as pdf , problem with fitting column and range

    Thanks for rep + ...

+ 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] Multiple Sheet Export to PDF, one sheet needs specific range based lastrow of data
    By xlyfe in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-25-2018, 07:39 PM
  2. [SOLVED] macro to export range of column to PDF
    By mazan2010 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-30-2016, 02:32 PM
  3. problem fitting data to chart
    By Rob1956 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-13-2013, 08:44 PM
  4. VBA: issue fitting picture to range
    By nmgmarques in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-29-2012, 02:30 PM
  5. Problem with trend line fitting
    By enp1ld in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-04-2009, 04:03 PM
  6. Curve fitting/goal seek problem
    By rambochuck in forum Excel General
    Replies: 6
    Last Post: 04-03-2008, 10:40 AM
  7. Best fitting a range of data to a particular value
    By eaton.rob@gmail.com in forum Excel General
    Replies: 0
    Last Post: 04-07-2006, 10:25 PM

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