Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Quick and Easy from Checkboxes


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Quick and Easy from Checkboxes

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Quick and Easy from Checkboxes


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Quick and Easy from Checkboxes

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
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
Quick/Easy Question? Dave Excel Discussion (Misc queries) 2 February 24th 09 06:44 PM
Quick Start to working with checkboxes etc within a worksheet Peter Rooney Excel Programming 7 September 15th 05 12:55 PM
Quick and easy chisigs2 Excel Worksheet Functions 2 August 24th 05 08:36 PM
Quick and Easy Part 2 DBAL[_6_] Excel Programming 3 May 13th 05 12:43 PM
Quick and Easy! DBAL[_6_] Excel Programming 3 May 13th 05 08:52 AM


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

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

About Us

"It's about Microsoft Excel"