#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forms Rosie Excel Worksheet Functions 1 February 22nd 10 08:49 PM
Forms Karen D Excel Discussion (Misc queries) 0 January 22nd 10 08:50 PM
Forms MarkOffice2007 Excel Discussion (Misc queries) 1 November 21st 09 08:25 PM
help - with forms [email protected] Excel Discussion (Misc queries) 1 July 31st 07 01:50 PM
Forms Mike Excel Worksheet Functions 0 July 5th 05 11:40 PM


All times are GMT +1. The time now is 01:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"