Hello - I could use some help. I am not understanding how to use checkbox's.
I would appreciate any help or advise on why the following code doesn't work. I get an "Object Required" error when it comes to the checkbox.2
The full code is:
Thanks for any help or explanation - Jim A
I would appreciate any help or advise on why the following code doesn't work. I get an "Object Required" error when it comes to the checkbox.2
Code:
If sh.Name = "Waiting List" Then
[COLOR=#0000ff]If CheckBox2.Value = False [/COLOR]Then GoTo a
Call UpDatebyDR_EdRoster_BHousing_NO_Sort
Call count
MsgBox (sh.Name & " updated.")
GoTo a
End If
The full code is:
Code:
Sub UpDate_Workbook()
Application.ScreenUpdating = False
Dim MacroWb As Workbook
Dim sh As Worksheet
Set MacroWb = Workbooks("MACROS-Student List_3.xlsm")
For Each sh In MacroWb.Worksheets
If sh.Name = "SMs" Then GoTo a
If sh.Name = "Yard" Then GoTo a
If sh.Name = "Waiting List" Then
[COLOR=#000080]If CheckBox2.Value = False [/COLOR]Then GoTo a
Call UpDatebyDR_EdRoster_BHousing_NO_Sort
Call count
MsgBox (sh.Name & " updated.")
GoTo a
End If
If sh.Name = "FULL Class List" Then
If CheckBox2.Value = True Then Call UpDatebyDR_EdRoster_BHousing 'trying different way, using true not false
MsgBox (sh.Name & " updated.")
GoTo a
End If
If sh.Name = "TABE" Then
If CheckBox2.Value = False Then GoTo a
Call UpDateTABE
MsgBox (sh.Name & " updated.")
GoTo a
End If
If CheckBox2.Value = False Then GoTo a
Call UpDatebyDR_EdRoster_BHousing
MsgBox (shName & " updated.")
End With
a:
Next sh
Application.ScreenUpdating = True
End Sub
Thanks for any help or explanation - Jim A
Last edited: