Hi,
I know this topic may have been covered before (I just cant find it im afraid)
I have a command button that is printing a number of sheets,
I have a table that tells me a sheet that needs to be printed based on what is selected ("X")
Below is what I'm using to print the basic sheets that need to print regardless,
Private Sub CommandButton2_Click()
'----------------------------------------PRINTING
Application.ScreenUpdating = False
With Sheets("contamination")
.Visible = True
.PrintOut Copies:=1, collate:=True
.Visible = True
End With
Application.ScreenUpdating = True
Worksheets("contamination").Activate
CON_PRINT.Hide
Worksheets("SG Tracker").Visible = False
Exit Sub
What can I use to select what sheet (Sheet1 / sheet 2) based on cells ("AL4) or ("AL5") containing "X"
if
sheet EMFILTER.range ("AL4" ="X") print sheet1
sheet EMFILTER.range("AL5" = "X") print sheet2
I know this topic may have been covered before (I just cant find it im afraid)
I have a command button that is printing a number of sheets,
I have a table that tells me a sheet that needs to be printed based on what is selected ("X")
Sheet 1 | X |
Sheet 2 |
Below is what I'm using to print the basic sheets that need to print regardless,
Private Sub CommandButton2_Click()
'----------------------------------------PRINTING
Application.ScreenUpdating = False
With Sheets("contamination")
.Visible = True
.PrintOut Copies:=1, collate:=True
.Visible = True
End With
Application.ScreenUpdating = True
Worksheets("contamination").Activate
CON_PRINT.Hide
Worksheets("SG Tracker").Visible = False
Exit Sub
What can I use to select what sheet (Sheet1 / sheet 2) based on cells ("AL4) or ("AL5") containing "X"
if
sheet EMFILTER.range ("AL4" ="X") print sheet1
sheet EMFILTER.range("AL5" = "X") print sheet2