• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

"Simple" Checkbox query

mr_hiboy

Member
Hi,

I've got a file that prepare a report pack and prints, various reports. Someone has asked to have a pack excluding a few reports, so I thought I would add a checkbox next to the report list.

Just been testing this and it doesn't like it. My VBA knowledge is light, but thought this was straight forward.

Cheers

Sub Macro6()

If CheckBox5.Value = True Then ActiveWindow.SelectedSheets.PrintOut Copies:=1

End Sub
 
Try:
Code:
Sub Macro6()

If CheckBox5.Value = Checked Then ActiveWindow.SelectedSheets.PrintOut Copies:=1

End Sub

My other thought would be that you might need to specify the CheckBox5 parent object (a worksheet, presumably?) depending on which sheet you are working from.
 
Back
Top