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

Hi All,

I have several checkboxes in a userform

I want to run the same code if any one or several of them is selected
or run another code if anyone of them or several of them deselected.

How can i do this..

Thanks for all the help

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default checkboxes and code

Do you mean this ?

Private Sub CheckBox1_Click()
If Me.CheckBox1.Value = True Then
'macro 1
Else
macro2
End If
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Soniya" wrote in message oups.com...
Hi All,

I have several checkboxes in a userform

I want to run the same code if any one or several of them is selected
or run another code if anyone of them or several of them deselected.

How can i do this..

Thanks for all the help



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default checkboxes and code

in that case i have to write code for each checkbox click or change
event. in my case any check box in the form i have to call the same
macro

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default checkboxes and code

If you have many then see
http://www.j-walk.com/ss/excel/tips/tip44.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Soniya" wrote in message oups.com...
in that case i have to write code for each checkbox click or change
event. in my case any check box in the form i have to call the same
macro



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
Checking and Unchecking CheckBoxes in code Ayo Excel Discussion (Misc queries) 0 April 3rd 09 08:41 PM
need code for hiding/unhiding sheets using checkboxes pzx8hf Excel Worksheet Functions 1 August 13th 08 12:11 AM
Adding checkboxes via code to a workheet Stef Excel Programming 0 February 1st 05 02:51 PM
Making All Checkboxes Run the Same Code MT DOJ Help Desk[_3_] Excel Programming 5 May 12th 04 06:24 AM
How to code event for dynamically generated checkboxes Chong Moua Excel Programming 0 July 9th 03 08:18 PM


All times are GMT +1. The time now is 09:31 PM.

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"