userform CheckBox print

  • Thread starter Thread starter dok112
  • Start date Start date
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
 
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
 

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

Back
Top