![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 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.
|
|
|
|
|
|
#2 |
|
New Member
Join Date: Mar 2002
Posts: 31
|
Just Dragging this to the top of the list incase the guy who has the answer is now up and about
|
|
|
|
|
|
#3 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
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 |
|
|
|
|
|
#4 |
|
New Member
Join Date: Mar 2002
Posts: 31
|
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? |
|
|
|
|
|
#5 |
|
New Member
Join Date: Mar 2002
Posts: 31
|
|
|
|
|
|
|
#6 |
|
New Member
Join Date: Mar 2002
Posts: 31
|
bringing it back to the top to in the hope that someone wiil be kind enough to solve this problem
|
|
|
|
|
|
#7 |
|
New Member
Join Date: Mar 2002
Posts: 31
|
keeping this on top cos i really need an answer!
|
|
|
|
|
|
#8 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
|
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?
__________________
~Anne Troy |
|
|
|
|
|
#9 |
|
New Member
Join Date: Mar 2002
Posts: 31
|
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 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|