Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / March 2007

Tip: Looking for answers? Try searching our database.

Trouble with Control Toolbox checkboxes and macros

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
the__elf@hotmail.com - 29 Mar 2007 16:26 GMT
Hello!

I'm trying to create a form with checkboxes that utilize a "nested"
behavior.  For example, you can't mark the "Email Account" checkbox
until you have first marked the "Network Account" checkbox.  I see
where I can manipulate the checkbox object's "enabled" property, but
I'm unfortunately at a loss for the macro coding that would toggle
that property.

Does anyone know of a way to accomplish a nested checkbox behavior
without incorporating macros?  I'd like to be able to make this form
without having to worry over macro security settings, and the "are you
sure you want to enable macros" mess that end users will eventually
trip on.

If accomplishing this without macros is impossible (which I fear will
be the case), what sort of macro code will it take?  It would be along
the lines of "If Checkbox1 = marked, then set Checkbox2 = enabled,"
but I lack the coding and syntax skill to get this to work properly.

Thanks in advance for your assistance!
the__elf@hotmail.com - 29 Mar 2007 19:29 GMT
Okay, I finally stumbled upon some decent resources and the syntax for
adjusting the properties on the checkbox objects.  I ended up with
this:

Private Sub CheckBox1_Change()
If CheckBox1.Value = True Then
CheckBox2.Enabled = True
Else
CheckBox2.Value = False
CheckBox2.Enabled = False
End If
End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.