ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Userform Printing (https://www.excelbanter.com/excel-discussion-misc-queries/102081-userform-printing.html)

sparx

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.


--
sparx
------------------------------------------------------------------------
sparx's Profile: http://www.excelforum.com/member.php...o&userid=16787
View this thread: http://www.excelforum.com/showthread...hreadid=566330


Bob Phillips

Userform Printing
 
Have you tried

userform1.PrintForm

--

HTH

Bob Phillips

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

"sparx" wrote in
message ...

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




sparx

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


--
sparx
------------------------------------------------------------------------
sparx's Profile: http://www.excelforum.com/member.php...o&userid=16787
View this thread: http://www.excelforum.com/showthread...hreadid=566330


sparx

Userform Printing
 

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


Harald Staff

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" skrev i melding
...

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




sparx

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.


--
sparx
------------------------------------------------------------------------
sparx's Profile: http://www.excelforum.com/member.php...o&userid=16787
View this thread: http://www.excelforum.com/showthread...hreadid=566330


Bob Phillips

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" wrote in
message ...

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




sparx

Userform Printing
 

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


Harald Staff

Userform Printing
 
Try switching True and False in Bob's code.

HTH. best wishes Harald

"sparx" skrev i melding
...

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





All times are GMT +1. The time now is 08:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com