Hi I have a print input sheet with 3 cells to enter a number into.
Each input cell is linked to cell"C10" on each of the worksheets "1A""1B" & "1C"
I want to be able to link a vba code to a button to be able to only print out all sheets with numbers inputted.
eg. it would be 2 sheets printed only as per the input sheet below
The following formula below is in worksheet "A1" on the the cell c10 highlighted
=IF(Input!G43="","",Input!G43)
The following below code prints all three sheets out even if one of the input numbers is blank. I Think the Isempty statement is interpreting "" as a value
and therefore thinks it isn't empty.
Is there a way to fix this??
I'd also like the entry cells on the input sheet which printout to turn light green to reflect confirmation they've been sent to the printer if possible.
Here's the button code so far :
Sub Button32_Click()
Dim idx As Integer
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If Not IsEmpty(ws.Range("c10").Value) Then
ws.PrintOut
End If
Next
End Sub
Much appreciate any help
Each input cell is linked to cell"C10" on each of the worksheets "1A""1B" & "1C"
I want to be able to link a vba code to a button to be able to only print out all sheets with numbers inputted.
eg. it would be 2 sheets printed only as per the input sheet below
The following formula below is in worksheet "A1" on the the cell c10 highlighted
=IF(Input!G43="","",Input!G43)
The following below code prints all three sheets out even if one of the input numbers is blank. I Think the Isempty statement is interpreting "" as a value
and therefore thinks it isn't empty.
Is there a way to fix this??
I'd also like the entry cells on the input sheet which printout to turn light green to reflect confirmation they've been sent to the printer if possible.
Here's the button code so far :
Sub Button32_Click()
Dim idx As Integer
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If Not IsEmpty(ws.Range("c10").Value) Then
ws.PrintOut
End If
Next
End Sub
Much appreciate any help