+ Reply to Thread
Results 1 to 12 of 12

Save to PDF Instead of Excel

  1. #1
    Registered User
    Join Date
    01-30-2024
    Location
    Malta
    MS-Off Ver
    Latest
    Posts
    8

    Save to PDF Instead of Excel

    Hi... i have the below code, that takes a list of transactions of various customers, moves the data for each customer to a 'formatted statement', and saves it in excel.
    I want to change the code so it saves is as PDF instead. Can someone help me adjust the final piece of code please. Many thanks

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    12-07-2023
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    10

    Re: Save to PDF Instead of Excel

    Try
    Please Login or Register  to view this content.
    instead of
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-30-2024
    Location
    Malta
    MS-Off Ver
    Latest
    Posts
    8

    Re: Save to PDF Instead of Excel

    Thanks for the quick reply... ERROR.png

  4. #4
    Registered User
    Join Date
    12-07-2023
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    10

    Re: Save to PDF Instead of Excel

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-30-2024
    Location
    Malta
    MS-Off Ver
    Latest
    Posts
    8

    Re: Save to PDF Instead of Excel

    Thankssss - Sorted.

  6. #6
    Registered User
    Join Date
    01-30-2024
    Location
    Malta
    MS-Off Ver
    Latest
    Posts
    8

    Re: Save to PDF Instead of Excel

    One more thing.... I added some rows at the top of the format sheet and it seems to have messed up the code

    What was in Row 1 - is now in Row 11 - Name of Customer
    What was in Row 2 - is now in Row 12 - Col Headers
    What was in Row 3 - is now in Row 13 - The Data

    I changed what i understood as per below.... but i seem to be loosing the 'Col Headers' for sure in the output.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-07-2023
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    10

    Re: Save to PDF Instead of Excel

    Hi, can you attach a sample workbook?

    as a guess, which worksheet do yo need to export as PDF,Ash (Data) or Dsh?
    if Dsh, try
    Please Login or Register  to view this content.
    instead of
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    01-30-2024
    Location
    Malta
    MS-Off Ver
    Latest
    Posts
    8

    Re: Save to PDF Instead of Excel

    FILE ATTACHED....

    Another issue is that when there is a lot of data, for the same client, I do not get the header on the second page / and also page number, (Page 1 of 1) etc.


    FV SOA Creation.xlsm

  9. #9
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Save to PDF Instead of Excel

    See next code and file attached where sheet "FORMAT" is prepared
    Please Login or Register  to view this content.
    Attached Files Attached Files
    - Battle without fear gives no glory - Just try

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,237

    Re: Save to PDF Instead of Excel

    A different approach...
    Please Login or Register  to view this content.
    By using Dictionary...You don't need any of this code...
    Please Login or Register  to view this content.
    Last edited by sintek; 02-25-2024 at 07:37 AM.
    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 star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  11. #11
    Registered User
    Join Date
    01-30-2024
    Location
    Malta
    MS-Off Ver
    Latest
    Posts
    8

    Re: Save to PDF Instead of Excel

    Amazing help. Thanks.

  12. #12
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,237

    Re: Save to PDF Instead of Excel

    Glad to contribute...Tx 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. VBA code to save files in MAC Excel without Save dialog Box
    By Usha Srivalli in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2021, 08:43 AM
  2. [SOLVED] Does Excel have an option to save the window size when you save a file?
    By Carson Dyle in forum Excel General
    Replies: 2
    Last Post: 07-28-2021, 01:14 PM
  3. Replies: 1
    Last Post: 12-19-2019, 07:04 AM
  4. Excel Macro - to move selected sheets no a new workbook and save, and save as pdf
    By manekankit in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-02-2019, 01:42 PM
  5. Excel doesn't change the cell format on save through the workbook save button
    By mitko1994 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-16-2017, 03:09 PM
  6. Remove Save/Save As buttons from Excel 2007
    By keen1598 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-10-2013, 01:14 PM
  7. [SOLVED] 'document not saved' for 'save' or 'save as' an EXCEL file
    By Judy Chuang in forum Excel General
    Replies: 1
    Last Post: 07-11-2005, 06:05 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