Print a userform on "Print" button click

rharri1972

Board Regular
Joined
Nov 12, 2021
Messages
132
Office Version
  1. 2019
Platform
  1. Windows
I have a userform3 that is a customer order form.
I am still building but wanted to print it to check how it is going to look at this point.
I created a command button and the code is:

Private Sub CommandButton1_Click()
UserForm3.PrintForm

End Sub

it looks like it is going to print when the button is clicked but doesn't print.
I check the printer que and it has a printer error.

I have checked just a document from word and the printer and computer are communication but the userform will not print.

any help?
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
It's basically what you have, but perhaps after executing the 'Print' button having to select the printer within the Userform will help resolve this issue?

VBA Code:
Option Explicit
Private Sub CommandButton1_Click()
If Application.Dialogs(xlDialogPrinterSetup).Show Then
    UserForm3.PrintForm
    Else
    Exit Sub
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,578
Messages
6,173,165
Members
452,504
Latest member
frankkeith2233

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top