Hi all!
This is the code of all module
Dim a As Boolean
Sub Check_errors_Click() 'checkbox created in vba, part of user form
If Check_errors.Value = True Then ' If checked then....
a = 1
End If
End Sub
Sub Execute_selected_code_Click()' control button on the same userform
If a = True Then 'if checkbox was checked then call.....
Call Check_for_errors
End If
End Sub
Sub ShowMenu1() 'if userform opened again, check what value of a is a show checkbox accordingly.
Check_errors.Value = 1
Userform1.Show
End Sub
So if Check_errors.Value = True - checkbox checked, then if i press control button "execute code" then it call some macro. if i open userform (menu) next time then checkbox gets value stored in a, that's why a declared before all subs. The problem that i cant succeed to assign a value to checkbox value, meaning that checkbox whatsoever is always unchecked. Please help and thanks in advance !!
Bookmarks