userform CheckBox print

D

dok112

In my userform, I have print options that I need help with. I have
Print Button in my userform. I want to be able to click the prin
button, and print only the pages that are associated the the checkboxe
that are checked.

ie.
CheckBox1 is unchecked - do not print
CheckBox2 is checked - Print when print command button is selected.

etc...9 buttons total.

Any help provided is greatly appreciated
 
T

Tom Ogilvy

Dim ctrl as Control
Dim chkbx as MSForms.Checkbox
for each ctrl in Me.Controls
if typeof ctrl is MSForms.Checkbox then
set chkbx = ctrl
if chkbx then
worksheets(chkbx.caption).Printout
end if
end if
Next
 
Top