Check Box to print in order

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

Re: Check Box to print in order

Post by ABabeNChrist »

Hi HansV
I added the changes to the code, Nothing seemed to change
I then followed my step just like post #6759
I then selected check boxes 1, 2, 5, 6 and then pressed my print button
It seemed to go through the cycle OK, I then checked the print out and it seemed to have only printed check box 1 & 6.
I then checked to make sure all unhidden file have been re-hidden, except for “_” that all seemed to look good.
So I tried to print once more, using same check box selections (1, 2, 5, 6) , now when I selected print I developed a serious error and program wanted to close. The error line.

Code: Select all

Worksheets("Additional Photos").Visible = xlSheetVisible
So I then tried it on another computer thinking maybe it’s my computer. It seems to do the same thing, same way on another computer.
I did notice though it seems to only print the first sheet and last sheet of selections made and I do not get an error message as long as I do not re-select, Check box which is for Additional Photos.
To print the word doc using check box 3 & 4 have never been a problem, they have worked great from day 1

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Check Box to print in order

Post by HansV »

I'm sorry, I'm out of ideas...
Best wishes,
Hans

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

Re: Check Box to print in order

Post by ABabeNChrist »

I thank you HansV
I also tried to use same code with check boxes on a new workbook it still will not work. I'll look around and do more studying and maybe I'll find something if not I'll try a different approuch.
Again many thanks

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

Re: Check Box to print in order

Post by ABabeNChrist »

Hi HansV
I searched around and got lucky and found a simple code I was able to modify to suit and it seems to work good.
No more errors, I dont have a clue why, I'm not going to complain.
Thank you HansV For all of your helpful suggestions I was then able to apply that knowledge to this code.
Here it is

Code: Select all

Dim wssheet As Worksheet

Application.ScreenUpdating = False
For Each wssheet In ActiveWorkbook.Worksheets
If Not wssheet.Name = "_" Then wssheet.Visible = xlSheetVisible
Next wssheet
If CheckBox1.Value = True Then Sheets("Cover Page").Select Replace:=True
If CheckBox2.Value = True Then Sheets("Client Information").Select Replace:=False
If CheckBox5.Value = True Then Sheets("Summary").Select Replace:=False
If CheckBox6.Value = True Then Sheets("Additional Photos").Select Replace:=False
ActiveWindow.SelectedSheets.PrintOut
Unload UserForm6
For Each wssheet In ActiveWorkbook.Worksheets
If Not wssheet.Name = "_" Then wssheet.Visible = xlSheetHidden
Next wssheet
Application.ScreenUpdating = True