Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 63
Default Clearing Check Boxes & Running a diff Macro when unchecking the ch

Ok, I'm using the Control check boxes. I have 6 of them. On each of the 6 I
have assigned a Macro to do something on the page. I have 2 problems.

1)I want to make so that only one box can be selected (Not sure if there is
a way to do that or have a macro to clear the rest of the check boxes)

2) I want two different actions when the box is unchecked. Right now the
macro runs when I check or uncheck the box. I would like one macro to run
when I check the box and one to run when I uncheck the box. Is there a way to
accomplish this?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 63
Default Clearing Check Boxes & Running a diff Macro when unchecking the ch

I was looking at it and a combo box might be easier, but I have no idea how
it works. How do I get my values in the drop down box? Also, can I have a
macro run for each of the selections in the drop down box? I'm open to new
ideas, whatever is easiest is fine with me.

Thanks Again

"Vick" wrote:

Ok, I'm using the Control check boxes. I have 6 of them. On each of the 6 I
have assigned a Macro to do something on the page. I have 2 problems.

1)I want to make so that only one box can be selected (Not sure if there is
a way to do that or have a macro to clear the rest of the check boxes)

2) I want two different actions when the box is unchecked. Right now the
macro runs when I check or uncheck the box. I would like one macro to run
when I check the box and one to run when I uncheck the box. Is there a way to
accomplish this?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Clearing Check Boxes & Running a diff Macro when unchecking the ch

hi
in each checkbox you will need code like this.
Private Sub CheckBox1_Click()
If CheckBox1 = True Then
CheckBox2 = False 'all the others = false
CheckBox3 = False
'Call macro1 'call a specific macro for this checkbox
End If
End Sub
I only did 3 check boxes to test but you will need to list all of them as =
false.
each check box needs code that if checked(=true) then uncheck(=false) all
the rest then call the specific macro for that check box.
make sence?

post back if confused.
Regards
FSt1

"Vick" wrote:

Ok, I'm using the Control check boxes. I have 6 of them. On each of the 6 I
have assigned a Macro to do something on the page. I have 2 problems.

1)I want to make so that only one box can be selected (Not sure if there is
a way to do that or have a macro to clear the rest of the check boxes)

2) I want two different actions when the box is unchecked. Right now the
macro runs when I check or uncheck the box. I would like one macro to run
when I check the box and one to run when I uncheck the box. Is there a way to
accomplish this?

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Clearing Check Boxes & Running a diff Macro when unchecking the ch

If you think that a combobox would be easier, you may find that Data|Validation
is even easier. It looks kind of the same and behaves kind of the same, but is
lots easier to implement (and lots easier to break!).

Debra Dalgleish has lots of tips:
http://contextures.com/xlDataVal01.html

Vick wrote:

I was looking at it and a combo box might be easier, but I have no idea how
it works. How do I get my values in the drop down box? Also, can I have a
macro run for each of the selections in the drop down box? I'm open to new
ideas, whatever is easiest is fine with me.

Thanks Again

"Vick" wrote:

Ok, I'm using the Control check boxes. I have 6 of them. On each of the 6 I
have assigned a Macro to do something on the page. I have 2 problems.

1)I want to make so that only one box can be selected (Not sure if there is
a way to do that or have a macro to clear the rest of the check boxes)

2) I want two different actions when the box is unchecked. Right now the
macro runs when I check or uncheck the box. I would like one macro to run
when I check the box and one to run when I uncheck the box. Is there a way to
accomplish this?

Thanks


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Clearing Check Boxes & Running a diff Macro when unchecking the ch

And a lot harder to read from the dropdown especially if you have a 75% zoom


--
Regards,

Peo Sjoblom


"Dave Peterson" wrote in message
...
If you think that a combobox would be easier, you may find that
Data|Validation
is even easier. It looks kind of the same and behaves kind of the same,
but is
lots easier to implement (and lots easier to break!).

Debra Dalgleish has lots of tips:
http://contextures.com/xlDataVal01.html

Vick wrote:

I was looking at it and a combo box might be easier, but I have no idea
how
it works. How do I get my values in the drop down box? Also, can I have a
macro run for each of the selections in the drop down box? I'm open to
new
ideas, whatever is easiest is fine with me.

Thanks Again

"Vick" wrote:

Ok, I'm using the Control check boxes. I have 6 of them. On each of
the 6 I
have assigned a Macro to do something on the page. I have 2 problems.

1)I want to make so that only one box can be selected (Not sure if
there is
a way to do that or have a macro to clear the rest of the check boxes)

2) I want two different actions when the box is unchecked. Right now
the
macro runs when I check or uncheck the box. I would like one macro to
run
when I check the box and one to run when I uncheck the box. Is there a
way to
accomplish this?

Thanks


--

Dave Peterson





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 63
Default Clearing Check Boxes & Running a diff Macro when unchecking th

Can you use an if statement in data validation? For example my list is in a
named range called TS, my data validation is in a2, my lookup value is in A1.
So if A1=TS, then it would pull up the TS List, I have 4 options in A1 this
is just one example?

"Dave Peterson" wrote:

If you think that a combobox would be easier, you may find that Data|Validation
is even easier. It looks kind of the same and behaves kind of the same, but is
lots easier to implement (and lots easier to break!).

Debra Dalgleish has lots of tips:
http://contextures.com/xlDataVal01.html

Vick wrote:

I was looking at it and a combo box might be easier, but I have no idea how
it works. How do I get my values in the drop down box? Also, can I have a
macro run for each of the selections in the drop down box? I'm open to new
ideas, whatever is easiest is fine with me.

Thanks Again

"Vick" wrote:

Ok, I'm using the Control check boxes. I have 6 of them. On each of the 6 I
have assigned a Macro to do something on the page. I have 2 problems.

1)I want to make so that only one box can be selected (Not sure if there is
a way to do that or have a macro to clear the rest of the check boxes)

2) I want two different actions when the box is unchecked. Right now the
macro runs when I check or uncheck the box. I would like one macro to run
when I check the box and one to run when I uncheck the box. Is there a way to
accomplish this?

Thanks


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Clearing Check Boxes & Running a diff Macro when unchecking th

So you want a dependent list?

See Debra's site again!
http://contextures.com/xlDataVal02.html

Vick wrote:

Can you use an if statement in data validation? For example my list is in a
named range called TS, my data validation is in a2, my lookup value is in A1.
So if A1=TS, then it would pull up the TS List, I have 4 options in A1 this
is just one example?

"Dave Peterson" wrote:

If you think that a combobox would be easier, you may find that Data|Validation
is even easier. It looks kind of the same and behaves kind of the same, but is
lots easier to implement (and lots easier to break!).

Debra Dalgleish has lots of tips:
http://contextures.com/xlDataVal01.html

Vick wrote:

I was looking at it and a combo box might be easier, but I have no idea how
it works. How do I get my values in the drop down box? Also, can I have a
macro run for each of the selections in the drop down box? I'm open to new
ideas, whatever is easiest is fine with me.

Thanks Again

"Vick" wrote:

Ok, I'm using the Control check boxes. I have 6 of them. On each of the 6 I
have assigned a Macro to do something on the page. I have 2 problems.

1)I want to make so that only one box can be selected (Not sure if there is
a way to do that or have a macro to clear the rest of the check boxes)

2) I want two different actions when the box is unchecked. Right now the
macro runs when I check or uncheck the box. I would like one macro to run
when I check the box and one to run when I uncheck the box. Is there a way to
accomplish this?

Thanks


--

Dave Peterson


--

Dave Peterson
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
Unchecking check boxes on exit Brisbane Rob Excel Discussion (Misc queries) 2 February 14th 06 07:33 PM
Clearing List Boxes Kevin Willhoit Excel Discussion (Misc queries) 2 June 17th 05 08:03 PM
Clearing Check Boxes and Cells Mel Excel Discussion (Misc queries) 1 May 26th 05 05:13 AM
Clearing Check Boxes and Cells Mel Excel Discussion (Misc queries) 1 May 25th 05 09:00 PM
Clearing Check Boxes and Cells Mel Excel Worksheet Functions 0 May 25th 05 05:52 PM


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