prompt for # of copies in print macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need a simple print macro that prompts a user for the sheet to be printed
and the number of copies. Anyone have any code for that purpose?
 
Hi,

Build a little dialog form add a Label, TextBox, Button rename it to something
like PrintDlg, give it a title, add a click eventhandler with the following
code

Private Sub CommandButton1_Click()
Me.Hide
ActiveSheet.PrintOut Copies:=Me.TextBox1.Text
End Sub
TextBox1 Should contain a valid number when you click the Button,
else you will get a runtime error

Greetings Jonjo
 
jonjo said:
Hi,

Build a little dialog form add a Label, TextBox, Button rename it to something
like PrintDlg, give it a title, add a click eventhandler with the following
code

Private Sub CommandButton1_Click()
Me.Hide
ActiveSheet.PrintOut Copies:=Me.TextBox1.Text
End Sub
TextBox1 Should contain a valid number when you click the Button,
else you will get a runtime error

Greetings Jonjo
Add a second inputBox for the name and write

Sheets(TextBox2.text).PrintOut ...
 
I am kind of a newbie to this stuff and need more step by step information on
how to do this.
 
I could send you an example by mail that contains a dialog and a example macro.
If you want.

Greetings Jonjo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top