ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,832
- Office Version
- 2007
- Platform
- Windows
I have the code below which gives me the message End with without with.
On my worksheet i have 3 checkboxes.
Basically what i am trying to do is only clear the checkboxes if cell G13 has no value.
If cell G13 has a value then there will be a check mark in one of the checkboxes so leave it alone & dont clear it.
This is where now the message keeps popping up.
On my worksheet i have 3 checkboxes.
Basically what i am trying to do is only clear the checkboxes if cell G13 has no value.
If cell G13 has a value then there will be a check mark in one of the checkboxes so leave it alone & dont clear it.
This is where now the message keeps popping up.
VBA Code:
Private Sub Workbook_Open()
Application.EnableEvents = False
With Sheets("INV")
If Range("G13").Value = "" Then
.CheckBox1 = False
.CheckBox2 = False
.CheckBox3 = False
.Range("G21:G23").Value = ""
.Range("G21").Interior.ColorIndex = 2
.Range("G21:G23").Borders.LineStyle = xlNone
End With
End If
Application.EnableEvents = True
Range("G13:G18,G27:G36,G46:G50").HorizontalAlignment = xlCenter
Range("G13:G18,G27:G36,G46:G50").VerticalAlignment = xlCenter
End Sub