Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 54
Default CF using Toggle Button result

I am trying to use CF to hide some cells (actually turning the font
color white).
I made a Control Toggle Button and linked it to cell G8.

The cells I want to hide are say B2...B6
I select that range and goto Conditional Formating

2 Questions:

1) How do I write the "formula is" CF expression testing if G8 is TRUE
or FALSE?
I tried G8=TRUE but that is not working.

2)How do I change the caption of the Toggle Button to show different
text if depressed or not.
So I want it to say SHOW and HIDE
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,718
Default CF using Toggle Button result

=G8=TRUE should work fine as a CF formula.

You'd need a macro to change the button's caption. Double click the button
while you're in design mode and write code like this:

Private Sub ToggleButton1_Click()
If Range("G8").Value = True Then
ToggleButton1.Caption = "Hide"
Else
ToggleButton1.Caption = "Show"
End If
End Sub

You might have to flip the logic I used. Also, better to use a range name
for cell G8 so if you insert a row, etc., the code still works.

--
Jim
"gtslabs" wrote in message
...
|I am trying to use CF to hide some cells (actually turning the font
| color white).
| I made a Control Toggle Button and linked it to cell G8.
|
| The cells I want to hide are say B2...B6
| I select that range and goto Conditional Formating
|
| 2 Questions:
|
| 1) How do I write the "formula is" CF expression testing if G8 is TRUE
| or FALSE?
| I tried G8=TRUE but that is not working.
|
| 2)How do I change the caption of the Toggle Button to show different
| text if depressed or not.
| So I want it to say SHOW and HIDE

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 751
Default CF using Toggle Button result

On the issue of Formula Is, you need $$ because the formula in CF is
copied identically to cell formulas.

=$G$8=TRUE

HTH
Kostis Vezerides

On Nov 25, 4:52*pm, gtslabs wrote:
I am trying to use CF to hide some cells (actually turning the font
color white).
I made a Control Toggle Button and linked it to cell G8.

The cells I want to hide are say B2...B6
I select that range and goto Conditional Formating

2 Questions:

1) How do I write the "formula is" CF expression testing if G8 is TRUE
or FALSE?
I tried G8=TRUE but that is not working.

2)How do I change the caption of the Toggle Button to show different
text if depressed or not.
So I want it to say SHOW and HIDE


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default CF using Toggle Button result

Do you need the =TRUE? Wouldn't =$G$8 do it?
--
David Biddulph


"vezerid" wrote in message
...
On the issue of Formula Is, you need $$ because the formula in CF is
copied identically to cell formulas.

=$G$8=TRUE

HTH
Kostis Vezerides

On Nov 25, 4:52 pm, gtslabs wrote:
I am trying to use CF to hide some cells (actually turning the font
color white).
I made a Control Toggle Button and linked it to cell G8.

The cells I want to hide are say B2...B6
I select that range and goto Conditional Formating

2 Questions:

1) How do I write the "formula is" CF expression testing if G8 is TRUE
or FALSE?
I tried G8=TRUE but that is not working.

2)How do I change the caption of the Toggle Button to show different
text if depressed or not.
So I want it to say SHOW and HIDE



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 751
Default CF using Toggle Button result

Personally I would not put it but I thought that I should maintain the
philosophy the OP used for his formula.

To the OP: Anything numeric and non-zero counts as TRUE in logical
context. Hence, especially since your formula in G8 is logical and
returns TRUE/FALSE, it would be enough to use the simplified formula
as David suggested.

Kostis

On Nov 25, 6:13*pm, "David Biddulph" <groups [at] biddulph.org.uk
wrote:
Do you need the =TRUE? *Wouldn't =$G$8 do it?
--
David Biddulph

"vezerid" wrote in message

...
On the issue of Formula Is, you need $$ because the formula in CF is
copied identically to cell formulas.

=$G$8=TRUE

HTH
Kostis Vezerides

On Nov 25, 4:52 pm, gtslabs wrote:

I am trying to use CF to hide some cells (actually turning the font
color white).
I made a Control Toggle Button and linked it to cell G8.


The cells I want to hide are say B2...B6
I select that range and goto Conditional Formating


2 Questions:


1) How do I write the "formula is" CF expression testing if G8 is TRUE
or FALSE?
I tried G8=TRUE but that is not working.


2)How do I change the caption of the Toggle Button to show different
text if depressed or not.
So I want it to say SHOW and HIDE


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
Toggle Button Squeaky Excel Worksheet Functions 0 September 17th 08 04:14 PM
Need to Use 1 Button to toggle On or Off Jim May Excel Discussion (Misc queries) 2 December 1st 07 08:01 PM
Toggle Button mick2 Excel Discussion (Misc queries) 5 November 27th 05 05:52 AM
Toggle button keithl816 Excel Discussion (Misc queries) 2 November 21st 05 09:16 PM
Toggle Button Dave_2k5 Excel Discussion (Misc queries) 2 September 1st 05 11:27 AM


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