Problem with checkbox - How do I set a checkbox to on or off?

seskindell

Active Member
Licensed User
Longtime User
How do I set a checkbox to on or off?

checkbox1.checked = False
does not work and
checkbox1.checked = True
does not work

if I put this under a button even no effect:

sub button1_click
checkbox1.checked = True
end sub

Thank you for your help.

- Steve
 

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
What tips me off to a reference error is that when I type "checkbox1.", when the "." is typed, a pop-up list of methods (such as Checked) should appear. If it doesn't, then something is wrong with the view name -- either I misspelled it or forgot to Dim it.
 
Upvote 0

ekkallan

New Member
Licensed User
Longtime User
Hi.
This is a problemfor me to.
Can you explain how it should work.

If I test to set the checkbox checked like in this example it dont work.

'Activity module
Sub Process_Globals

End Sub

Sub Globals

Dim CheckBox1 As CheckBox

End Sub

Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("test2")

CheckBox1.Initialize("")
CheckBox1.Checked = True

End Sub


What is wrong?
 
Upvote 0

ekkallan

New Member
Licensed User
Longtime User
Yes! It worked.
Thank you for the quick answer. Now I can focus on my real problems.
Thank you again.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…