ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Print UserForm? (https://www.excelbanter.com/excel-programming/428765-print-userform.html)

Charlotte E

Print UserForm?
 
Is it possible to print a UserForm from VBA?

And, if so, how?


TIA,




Mark A. Sam

Print UserForm?
 
Charlote,

DoCmd.PrintOut , 1, 1, acHigh, 1, True

This says print the form from page 1 to 1 print quality High, print 1 copy
and collate.

God Bless,

Mark A. Sam

"Charlotte E" <@ wrote in message
...
Is it possible to print a UserForm from VBA?

And, if so, how?


TIA,






Mark A. Sam

OOOOPs.
 
Sorry Charlotte,

I thought this was an Access group. I didn't notice it was Excel.
Disregard my previous response.

God Bless,

Mark A. Sam


"Charlotte E" <@ wrote in message
...
Is it possible to print a UserForm from VBA?

And, if so, how?


TIA,






Charlotte E

Print UserForm?
 
Is it possible to print a UserForm from VBA?

Okey...

I found the way: Me.PrintForm (Simple :-)

But, a little too simple!

It just starts printing - I would like it to ask for a printer and also give
the option to cancel.

For some reason, I can't get...

Application.Dialogs(xlDialogPrinterSetup).Show

....to work within a form???


Anyone?

TIA,





Dave Peterson

Print UserForm?
 
Maybe add a button to the userform for printing and then have it do:

Me.PrintForm



Charlotte E wrote:

Is it possible to print a UserForm from VBA?

And, if so, how?

TIA,


--

Dave Peterson

Tom Hutchins

Print UserForm?
 
The easiest way is the PrintForm command:
UserForm1.PrintForm

From code within (behind?) the form itself, you can use
Me.PrintForm

Hope this helps,

Hutch

"Charlotte E" wrote:

Is it possible to print a UserForm from VBA?

And, if so, how?


TIA,






All times are GMT +1. The time now is 12:32 AM.

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