View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Pre-checking checkboxes in a dialog box

Mike,

When the checkbox is added, you need to set the value to True. So in John's
example, the checkbox is added with

PrintDlg.CheckBoxes.Add 78, TopPos, 150, 16.5
PrintDlg.CheckBoxes(SheetCount).Text = _

you then need to ad the line

PrintDlg.CheckBoxes(SheetCount).Value = True

Clearly you need to adapt to your code, and add the test for Executive etc.,
but that is the basic principle.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Mike" wrote in message
...

I have used some VBA script that I obtained from John Walkenbach's website
(specifically, http://j-walk.com/ss/excel/tips/tip48.htm) to provide users
with a dialog box to choose a selection of worksheets to print, in my case
using the modification under the link show that is suggested to ensure
continuous page numbering. It works great.

I have multiple user groups, however, and have a good idea of what

different
'packs' these different user groups might want (that is, depending on

their
seniority/role, they may want the "Executive version", the "Full/Standard
version", etc.. and the version choice should drive standardised,

different
worksheet selections).

Can I adapt the script to pre-check only certain checkboxes, so that when
the macro for the "Executive version" is run, say, the dialog box shows up
as before but the user is just confirming rather than actively choosing a
selection of worksheets? This way, at least they'll see/appreciate what
they're not getting in choosing the more summary versions of the different
'packs' provided, which they wouldn't get if I wrote a standard macro to
just print the relevant worksheet selection.

Thanks in advance for any help

Mike