Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default prompt for # of copies in print macro

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default prompt for # of copies in print macro

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
"SteveH" wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default prompt for # of copies in print macro



"jonjo" wrote:

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 ...

"SteveH" wrote:

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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default prompt for # of copies in print macro

I am kind of a newbie to this stuff and need more step by step information on
how to do this.

"jonjo" wrote:

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
"SteveH" wrote:

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?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default prompt for # of copies in print macro

I could send you an example by mail that contains a dialog and a example macro.
If you want.

Greetings Jonjo

"SteveH" wrote:

I am kind of a newbie to this stuff and need more step by step information on
how to do this.

"jonjo" wrote:

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
"SteveH" wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Number of copies to print keep defaulting to 12 copies why? Boski Excel Worksheet Functions 1 October 8th 09 05:33 PM
print defaults at 20 copies KneeDown2Up Excel Discussion (Misc queries) 2 July 13th 07 05:50 PM
ask for one print and it gives 6 copies raybag Excel Discussion (Misc queries) 0 October 17th 06 03:03 AM
Macro to Print Multiple Tabs with a Specific # of Copies Brad Excel Programming 0 December 22nd 04 03:41 PM
Print Copies in with statement? Ron de Bruin Excel Programming 2 August 6th 03 12:00 AM


All times are GMT +1. The time now is 11:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"