return a value from a dialog box

G

Guest

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
 
T

Tom Ogilvy

use this dialog to set the printer:

application.Dialogs(xlDialogPrinterSetup).Show

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

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

Top