Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() So I'm having an issue with Checkbox values... I just want my code to do this... If Checkbox1 is checked then run this code End if If Checkbox1 is unchecked then run this code End if Somehow or another it just doesn't seem to be working for me, I tried If Checkbox1.Checked=True Then 'Code End If If Checkbox1.Checked=False Then 'Code End If For some reason, it didn't agree with me, it gave me a Compile Error and said Method or Data Member not found. I give up. Checkbox is in a userform by the way, not sure if that makes a difference or not. -- RPIJG ------------------------------------------------------------------------ RPIJG's Profile: http://www.excelforum.com/member.php...fo&userid=9285 View this thread: http://www.excelforum.com/showthread...hreadid=483304 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try:
If CheckBox1.Value = True Then MsgBox "checked" Else MsgBox "not Checked" End If Hope this helps Rowan RPIJG wrote: So I'm having an issue with Checkbox values... I just want my code to do this... If Checkbox1 is checked then run this code End if If Checkbox1 is unchecked then run this code End if Somehow or another it just doesn't seem to be working for me, I tried If Checkbox1.Checked=True Then 'Code End If If Checkbox1.Checked=False Then 'Code End If For some reason, it didn't agree with me, it gave me a Compile Error and said Method or Data Member not found. I give up. Checkbox is in a userform by the way, not sure if that makes a difference or not. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks that worked like a charm, for some reason the VB help inde showed it as Checked instead of Value, replacing fixed the proble right up -- RPIJ ----------------------------------------------------------------------- RPIJG's Profile: http://www.excelforum.com/member.php...nfo&userid=928 View this thread: http://www.excelforum.com/showthread.php?threadid=48330 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You're welcome.
PS you may have been looking at help for the checkboxes collection rather than the Checkbox Control. RPIJG wrote: Thanks that worked like a charm, for some reason the VB help index showed it as Checked instead of Value, replacing fixed the problem right up. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Quick/Easy Question? | Excel Discussion (Misc queries) | |||
Quick Start to working with checkboxes etc within a worksheet | Excel Programming | |||
Quick and easy | Excel Worksheet Functions | |||
Quick and Easy Part 2 | Excel Programming | |||
Quick and Easy! | Excel Programming |