Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default binding checkboxes

Ok here is the issue, I want to have a checkbox that is
dependant on another checkbox. So if checkbox 1 is checked
than checkbox 2 is active, if checkbox 1 is not checked
then checkbos 2 is greyed out and isn't allowed to be
checked. I found that there was a "bound" function in VBA
but I don't know how to use it. please help!

--Keri
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default binding checkboxes

The bind function refers to the data source for the
objects so you can also set this up to change the data
source with a similar conditional statement. If you've
bound the control to a data source, a valid change in VBA
will change the source at the same time. Just set before
enable/disable.

Private Sub CheckBox1_Click()
'check1 on checked, check2 enabled
If Me.CheckBox1.Value = True Then
Me.CheckBox2.Enabled = true
Else
'check1 not checked, check2 disabled
If Me.CheckBox1.Value = False Then
Me.CheckBox2.Enabled = False
End If
End If
End Sub

-----Original Message-----
Ok here is the issue, I want to have a checkbox that is
dependant on another checkbox. So if checkbox 1 is

checked
than checkbox 2 is active, if checkbox 1 is not checked
then checkbos 2 is greyed out and isn't allowed to be
checked. I found that there was a "bound" function in

VBA
but I don't know how to use it. please help!

--Keri
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default binding checkboxes

Hi Keri,

Keri wrote:
Ok here is the issue, I want to have a checkbox that is
dependant on another checkbox. So if checkbox 1 is checked
than checkbox 2 is active, if checkbox 1 is not checked
then checkbos 2 is greyed out and isn't allowed to be
checked. I found that there was a "bound" function in VBA
but I don't know how to use it. please help!


you can use this little Code:

Private Sub CheckBox1_Click()
CheckBox2.Enabled = CheckBox1.Value
End Sub

--
Regards
Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)

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
Late Binding Todd Huttenstine[_3_] Excel Programming 3 April 30th 04 11:01 AM
Late Binding Cindy Excel Programming 11 April 23rd 04 03:34 PM
XML Data Binding José Pérez Hernández Excel Programming 0 April 11th 04 08:19 PM
EARLY binding or LATE binding ? jason Excel Programming 6 February 26th 04 04:57 PM
DAO Late Binding? Sharqua Excel Programming 2 January 4th 04 02:05 AM


All times are GMT +1. The time now is 03:18 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"