Printing one worksheet from another

Thespiv

New Member
Joined
Mar 2, 2002
Messages
31
I know how to add a button to a form and I also know how to print the form being viewed, but I can't figure out how to insert a button which will print a different form. The user form I have basically adds data to a second Printed version, I only want the printed version to be printed from my button in the user form.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Just Dragging this to the top of the list incase the guy who has the answer is now up and about :)
 
Upvote 0
Hi

If the UserForm you want printed is called UserForm 1, just use:

Private Sub CommandButton1_Click()
UserForm1.PrintForm
End Sub

On the other UserForm
 
Upvote 0
Hey Dave thanks for the advice, Little green around the visual basic stuff, I kinda guessed a little and camr up with this syntex from yours:
Private Sub CommandButton1_Click()
risk_assesment_form.PrintForm
End Sub.
saved the file, closd it, re-opened it, and alas it didnt work, any suggestions where things might be going wrong? :(
 
Upvote 0
bringing it back to the top to in the hope that someone wiil be kind enough to solve this problem :rolleyes:
 
Upvote 0
Did you create a command button for that code to work? WHEN do you want that form to print? When you open the file, when you click a button, when?
 
Upvote 0
I used the forms tool bar to create the button, I want the form to print when the user click on the button, I iserted a button so as the user could simply print the form when they had completed their inputting. would one normally create a button if you wanted the form to print on open?
This message was edited by Thespiv on 2002-03-04 11:14
 
Upvote 0

Forum statistics

Threads
1,213,496
Messages
6,113,995
Members
448,539
Latest member
alex78

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