+ Reply to Thread
Results 1 to 5 of 5

VBA to print to pdf or physical copy a long user form

  1. #1
    Registered User
    Join Date
    05-21-2019
    Location
    Dublin
    MS-Off Ver
    2010
    Posts
    6

    VBA to print to pdf or physical copy a long user form

    Hi all,


    As the title suggests, I am trying to print a relatively large userform to PDF or a physical copy by giving the user an option to hit a 'print' button.


    To do so, I am using the following code which was taken from this site on another thread.

    Please Login or Register  to view this content.
    The above works in so much that the printer dialog box appears, yet when I try to print to PDF, it only gives me the portion of the userform currently visible on the screen, not the entire userform.

    Is there something I am missing here?

    Happy to accept all and any help.

    To give some background:
    I am working for a healthcare provider digitising their paper based forms for monitoring COVID19 patients. They love the form and the reliability of it, but still want to maintain physical or at least .pdf copies.

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,295

    Re: VBA to print to pdf or physical copy a long user form

    from one of my print routines
    try 'fit to page' or 'zoom ratio'


    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-21-2019
    Location
    Dublin
    MS-Off Ver
    2010
    Posts
    6

    Re: VBA to print to pdf or physical copy a long user form

    Thanks for sharing. I added in some additional code to my original based on what you posted. Unfortunately still the only portion of the userform being sent to pdf is the visible portion on screen.

    I thought the .FitToPagesTall and .FitToPagesWide would solve the issue?

    Could you advise?


    Please Login or Register  to view this content.

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,295

    Re: VBA to print to pdf or physical copy a long user form

    I recognised the problem from some past posts.
    The answer may be in the thread below.
    I put the last file on my desktop and it does place a pdf on the desktop.
    Maybe need some twiddling to contain on a single page.


  5. #5
    Registered User
    Join Date
    05-21-2019
    Location
    Dublin
    MS-Off Ver
    2010
    Posts
    6

    Re: VBA to print to pdf or physical copy a long user form

    Thanks for the direction to that thread but unfortunately implementing the suggest results in the same issue. The user form is not printing correctly, regardless of whether I adjust the zoom etc. I have a feeling it just may not be possible! I have tried many solutions and they all failed.

+ 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. Print or PDF a User Form
    By deanblew in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-16-2019, 04:42 AM
  2. Print From user form.
    By leoruphen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-11-2014, 02:15 PM
  3. Print User Form
    By kachuen2006 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-30-2014, 04:35 PM
  4. How do I use scroll bar to view very LONG label in User Form?
    By sauerj in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-17-2012, 12:52 AM
  5. Determine Physical Row Print size
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-15-2012, 06:37 PM
  6. Print preview from user form opened from a user form
    By Brunstgnegg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-13-2011, 05:12 AM
  7. User Form Print
    By Woo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-25-2005, 11:51 PM

Tags for this Thread

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