Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Forms
What is the correctway to initialize a checkibox so that the check
mark appears? With this initialization, if strFormBooleanReplaceConfirmEachChangeOption = "True" the program goes to ChB05_Click tia Private Sub UserForm_Initialize() If (strFormBooleanReplaceConfirmEachChangeOption = "True") Then ChB05 = "True" End If end sub Private Sub ChB05_Click() If (bInitializationComplete = True) Then If (strFormBooleanReplaceConfirmEachChangeOption = "False") Then strFormBooleanReplaceConfirmEachChangeOption = "True" Else strFormBooleanReplaceConfirmEachChangeOption = "False" End If End If End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Forms
Bob,
Clicking on a CheckBox toggles it's True/False value without code. If you need to ensure that (bInitializationComplete = True) before you allow the change then Private Sub ChB05_Click() 'Click switches the value If (bInitializationComplete = False) Then ChB05.Value = Not ChB05.Value 'This switches it back again End Sub Initialise the Checkbox with ChB05.Value = True HTH Henry wrote in message ... What is the correctway to initialize a checkibox so that the check mark appears? With this initialization, if strFormBooleanReplaceConfirmEachChangeOption = "True" the program goes to ChB05_Click tia Private Sub UserForm_Initialize() If (strFormBooleanReplaceConfirmEachChangeOption = "True") Then ChB05 = "True" End If end sub Private Sub ChB05_Click() If (bInitializationComplete = True) Then If (strFormBooleanReplaceConfirmEachChangeOption = "False") Then strFormBooleanReplaceConfirmEachChangeOption = "True" Else strFormBooleanReplaceConfirmEachChangeOption = "False" End If End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Forms | Excel Worksheet Functions | |||
Forms | Excel Discussion (Misc queries) | |||
Forms | Excel Discussion (Misc queries) | |||
help - with forms | Excel Discussion (Misc queries) | |||
Forms | Excel Worksheet Functions |