+ Reply to Thread
Results 1 to 9 of 9

Userform Printing

  1. #1
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Wink Userform Printing

    Hello All, can anybody help, I have added a userform to my worksheet via a macro and have a text box to be displayed onscreen - is there a way to make this printable as at the moment, pressing ctrl&P or trying to print while this screen is displayed wont happen?

    Any help is much appreciated.

  2. #2
    Bob Phillips
    Guest

    Re: Userform Printing

    Have you tried

    userform1.PrintForm

    --

    HTH

    Bob Phillips

    (replace xxxx in the email address with gmail if mailing direct)

    "sparx" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hello All, can anybody help, I have added a userform to my worksheet via
    > a macro and have a text box to be displayed onscreen - is there a way to
    > make this printable as at the moment, pressing ctrl&P or trying to print
    > while this screen is displayed wont happen?
    >
    > Any help is much appreciated.
    >
    >
    > --
    > sparx
    > ------------------------------------------------------------------------
    > sparx's Profile:

    http://www.excelforum.com/member.php...o&userid=16787
    > View this thread: http://www.excelforum.com/showthread...hreadid=566330
    >




  3. #3
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Thumbs up Userform printing

    Hi Bob,

    No I have not tried that ( still quite new to VB ) and will try it.
    Hopefully it will resolve the issue.
    Thanks

  4. #4
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Question Printing Multipages in UserForm

    Hi Bob,

    Your method did work but can you please help again.

    The UserForm1 is called "HelpMe" and consists of a Multipage1 form with 15 header tabs. I put your macro on a command button and it prints out the first page of the 15 header tabs - how can I make it print all 15 as I dont want to put a button on each page of the Multipage1 form.

    One button to print all will be better.

    Thanks

  5. #5
    Harald Staff
    Guest

    Re: Userform Printing

    Private Sub CommandButton1_Click()
    Dim i As Long
    For i = 0 To MultiPage1.Pages.Count - 1
    MultiPage1.Value = i
    Me.Repaint
    DoEvents
    Me.PrintForm
    Next
    End Sub

    HTH. Best wishes Harald

    "sparx" <[email protected]> skrev i melding
    news:[email protected]...
    >
    > Hi Bob,
    >
    > Your method did work but can you please help again.
    >
    > The UserForm1 is called "HelpMe" and consists of a Multipage1 form with
    > 15 header tabs. I put your macro on a command button and it prints out
    > the first page of the 15 header tabs - how can I make it print all 15
    > as I dont want to put a button on each page of the Multipage1 form.
    >
    > One button to print all will be better.
    >
    > Thanks
    >
    >
    > --
    > sparx
    > ------------------------------------------------------------------------
    > sparx's Profile:

    http://www.excelforum.com/member.php...o&userid=16787
    > View this thread: http://www.excelforum.com/showthread...hreadid=566330
    >




  6. #6
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Thumbs up UserForm Printing

    Hi Harald, your code worked and many thanks.

    Would you know how to within your code, make each page:

    enabled = true
    print
    enabled = false

    Whats happening is: the pages I have in the userform are enabled ( false ) and each page is greyed out - when you print using your code, the print is also greyed out.

    Is there a code that would make each page enabled so the text prints normal then prints, then is not enabled anymore so then looks greyed out again?

    I hope you can help.

  7. #7
    Bob Phillips
    Guest

    Re: Userform Printing

    For i = 0 To MultiPage1.Pages.Count - 1
    MultiPage1.Pages(i).Enabled = False
    MultiPage1.Value = i
    Me.Repaint
    DoEvents
    Me.PrintForm
    MultiPage1.Pages(i).Enabled = True
    Next


    --

    HTH

    Bob Phillips

    (replace xxxx in the email address with gmail if mailing direct)

    "sparx" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Harald, your code worked and many thanks.
    >
    > Would you know how to within your code, make each page:
    >
    > enabled = true
    > print
    > enabled = false
    >
    > Whats happening is: the pages I have in the userform are enabled (
    > false ) and each page is greyed out - when you print using your code,
    > the print is also greyed out.
    >
    > Is there a code that would make each page enabled so the text prints
    > normal then prints, then is not enabled anymore so then looks greyed
    > out again?
    >
    > I hope you can help.
    >
    >
    > --
    > sparx
    > ------------------------------------------------------------------------
    > sparx's Profile:

    http://www.excelforum.com/member.php...o&userid=16787
    > View this thread: http://www.excelforum.com/showthread...hreadid=566330
    >




  8. #8
    Forum Contributor
    Join Date
    11-23-2004
    Location
    Bristol
    MS-Off Ver
    2016
    Posts
    225

    Thumbs up Userform Printing

    Somethings still strange, the text is still being printed greyed out.
    Not to worry.

    Thanks

  9. #9
    Harald Staff
    Guest

    Re: Userform Printing

    Try switching True and False in Bob's code.

    HTH. best wishes Harald

    "sparx" <[email protected]> skrev i melding
    news:[email protected]...
    >
    > Somethings still strange, the text is still being printed greyed out.
    > Not to worry.
    >
    > Thanks
    >
    >
    > --
    > sparx
    > ------------------------------------------------------------------------
    > sparx's Profile:

    http://www.excelforum.com/member.php...o&userid=16787
    > View this thread: http://www.excelforum.com/showthread...hreadid=566330
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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