![]() |
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 |
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 |
All times are GMT +1. The time now is 10:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com