Good morning everyone. I am having a bit of difficulty trying to get a button working properly in Excel 2007, VBA. What this button does is group worksheets based on the check box value being true. Then it will display the print dialogue so the the user can print to PDF or to their printer.
I am not sure how to go about this. I did try using:
If me.chkTable1 = True Then Sheets(Table3.Name).Select
If me.chkTable2 = True Then Sheets(Table4.Name).Select
However I found that with this method the previous worksheet will deselect. I thought that maybe an array will work. That if the value of me.chkTableX = True then the array would be populated with the worksheet. Then at the end I could select the array for printing.
I am fairly new, so my apologies if I am missing something.