ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,731
- Office Version
- 2007
- Platform
- Windows
I am trying to check if a checkbox is true & if so do something.
My invoice is printed & i see the message INVOICE HAS NOW BEEN SAVED.
It is now i wish the code to see if Checkbox2 has a tick in it.
So a basic check & a Msgbox pop to be shown saying HI.
Ive run this code many times & just dont see the Hi meessage at all.
The code continues & clears the contents
Why is the code ignoring my If code ???
This is the end of my code.
Everything works fine & does what the code asks its to BUT
My invoice is printed & i see the message INVOICE HAS NOW BEEN SAVED.
It is now i wish the code to see if Checkbox2 has a tick in it.
So a basic check & a Msgbox pop to be shown saying HI.
Ive run this code many times & just dont see the Hi meessage at all.
The code continues & clears the contents
Why is the code ignoring my If code ???
This is the end of my code.
Everything works fine & does what the code asks its to BUT
VBA Code:
With Sheets("INV")
Worksheets("INV").Activate
End With
'ActiveWindow.SelectedSheets.PrintOut copies:=1 'INVOICE NOW PRINTED
MsgBox "INVOICE HAS NOW BEEN SAVED", vbInformation, "INVOICE PRINT OK MESSAGE"
If CheckBox2 = True Then
MsgBox "HI"
End If
Range("L4").Value = Range("L4").Value + 1
Range("G27:L36").ClearContents
Range("G39:G40").ClearContents
Range("G46:G50").ClearContents
Range("G13").ClearContents
CheckBox1 = False
CheckBox2 = False
Range("G13").Select
ActiveWorkbook.Save
End Sub