Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default return a value from a dialog box

I have some code which alloows the user to select which sheets to print. I
want to call up the printer dialog box to select the printer and number of
copies. The print dialog box pops up fine, and I can select my choice of
printer, but I am unable to get the number of copies I want.

The code itself is fairly long, but the jist of it is that by clicking my
"Print" button on the main workshet, the code runs and a dialog box with
check boxes appears, listing all o fhte available charts for printing. The
user selects the desired charts and clicks "OK" to start the print. The
program then uses a FOR EACH loop to cycle through all of the check boxes and
print the sheets.

It would be a very easy fix to assign a variable to the number of copies in
the dialog box and create a nested loop, but I can't seem to extract this
value from the dialog box.

Alternatively, if I could just get the dialog box to function the way it was
designed and run the FOR EACH loop the desired number of times, that would be
even better.

Any suggestions?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default return a value from a dialog box

use this dialog to set the printer:

application.Dialogs(xlDialogPrinterSetup).Show

then put up an inputbox or userform to get the number of copies.

--
Regards,
Tom Ogilvy

"JonR" wrote in message
...
I have some code which alloows the user to select which sheets to print.

I
want to call up the printer dialog box to select the printer and number of
copies. The print dialog box pops up fine, and I can select my choice of
printer, but I am unable to get the number of copies I want.

The code itself is fairly long, but the jist of it is that by clicking my
"Print" button on the main workshet, the code runs and a dialog box with
check boxes appears, listing all o fhte available charts for printing.

The
user selects the desired charts and clicks "OK" to start the print. The
program then uses a FOR EACH loop to cycle through all of the check boxes

and
print the sheets.

It would be a very easy fix to assign a variable to the number of copies

in
the dialog box and create a nested loop, but I can't seem to extract this
value from the dialog box.

Alternatively, if I could just get the dialog box to function the way it

was
designed and run the FOR EACH loop the desired number of times, that would

be
even better.

Any suggestions?

Thanks



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
How to delete the "Insert Function Dialog Box" (dialog box only)? TBI''d biker Excel Worksheet Functions 2 April 7th 07 09:18 PM
Compare Value in Cell 1 to a List, Return Value if Match otherwise Return Null Ben Excel Discussion (Misc queries) 2 March 15th 07 01:02 AM
LOOKUP and return the column heading for IF/THEN return for False NN Excel Discussion (Misc queries) 1 October 6th 06 11:24 AM
control of dialog macro dialog box. on open Gerry Abbott Excel Programming 0 July 22nd 04 05:41 PM
VBA Syntax for VLOOKUP to return array of return values Alan Beban[_3_] Excel Programming 7 August 5th 03 11:41 AM


All times are GMT +1. The time now is 07:02 AM.

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"