Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Toggle Text in a column to be visible or not visible

I have a report in an Excel 2002 spreadsheet that is
presented quartely. There is a column that contains
comments that I need for my own use but when the report
is presented to the Board only the comment of "Special
Mention" needs to be shown. My question is; How can I
make the text in the column containing the comments that
I don't want visible to be not visible? (the only comment
showing would be "special mention") Also I need some way
to be able to toggle back and forth between making the
text visible and not visible. I was thinking of using two
buttons, each containing the code that would serve my
purpose, but I am unsure of how to do this. Any help with
a solution or pointing me in the proper direction will be
greatly appreciated. Thank you.
Dave
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Toggle Text in a column to be visible or not visible

set the text's COLOR to the same as the cell's background
color. This will make the writing seem to disappear.

the following test should be stepped through using
shift+F8
The first test line will make the text vanish & th
esecong will make it appear. First select some cells with
text . try changing the cells color.

Sub test()

Reset Selection, False
Reset Selection, True

End Sub

Sub Reset(cell As Range, Optional bShow As Boolean = True)
Dim clr As Long
With cell

If bShow Then
.Font.ColorIndex = 0
Else
clr = .Interior.ColorIndex
If .Interior.ColorIndex < 0 Then
clr = 2
End If
.Font.ColorIndex = clr
End If
End With
End Sub


Patrick Molloy
Microsoft Excel MVP

-----O

riginal Message-----
I have a report in an Excel 2002 spreadsheet that is
presented quartely. There is a column that contains
comments that I need for my own use but when the report
is presented to the Board only the comment of "Special
Mention" needs to be shown. My question is; How can I
make the text in the column containing the comments that
I don't want visible to be not visible? (the only

comment
showing would be "special mention") Also I need some way
to be able to toggle back and forth between making the
text visible and not visible. I was thinking of using

two
buttons, each containing the code that would serve my
purpose, but I am unsure of how to do this. Any help

with
a solution or pointing me in the proper direction will

be
greatly appreciated. Thank you.
Dave
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Toggle Text in a column to be visible or not visible

Hey Patrick,

Thank you for your quick reply. I will be giving it a try
very soon. Thanks again.

Dave
-----Original Message-----
set the text's COLOR to the same as the cell's background
color. This will make the writing seem to disappear.

the following test should be stepped through using
shift+F8
The first test line will make the text vanish & th
esecong will make it appear. First select some cells with
text . try changing the cells color.

Sub test()

Reset Selection, False
Reset Selection, True

End Sub

Sub Reset(cell As Range, Optional bShow As Boolean = True)
Dim clr As Long
With cell

If bShow Then
.Font.ColorIndex = 0
Else
clr = .Interior.ColorIndex
If .Interior.ColorIndex < 0 Then
clr = 2
End If
.Font.ColorIndex = clr
End If
End With
End Sub


Patrick Molloy
Microsoft Excel MVP

-----O

riginal Message-----
I have a report in an Excel 2002 spreadsheet that is
presented quartely. There is a column that contains
comments that I need for my own use but when the report
is presented to the Board only the comment of "Special
Mention" needs to be shown. My question is; How can I
make the text in the column containing the comments that
I don't want visible to be not visible? (the only

comment
showing would be "special mention") Also I need some way
to be able to toggle back and forth between making the
text visible and not visible. I was thinking of using

two
buttons, each containing the code that would serve my
purpose, but I am unsure of how to do this. Any help

with
a solution or pointing me in the proper direction will

be
greatly appreciated. Thank you.
Dave
.

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Toggle Text in a column to be visible or not visible

another solution by change of format:
Sub Reset(cell As Range, Optional bShow As Boolean = True)
If bShow Then
cell.NumberFormat = "General"
Else
cell.NumberFormat = ";;;"
End If
End Sub

MP

"Patrick Molloy" a écrit dans le message de
...
set the text's COLOR to the same as the cell's background
color. This will make the writing seem to disappear.

the following test should be stepped through using
shift+F8
The first test line will make the text vanish & th
esecong will make it appear. First select some cells with
text . try changing the cells color.

Sub test()

Reset Selection, False
Reset Selection, True

End Sub

Sub Reset(cell As Range, Optional bShow As Boolean = True)
Dim clr As Long
With cell

If bShow Then
.Font.ColorIndex = 0
Else
clr = .Interior.ColorIndex
If .Interior.ColorIndex < 0 Then
clr = 2
End If
.Font.ColorIndex = clr
End If
End With
End Sub


Patrick Molloy
Microsoft Excel MVP

-----O

riginal Message-----
I have a report in an Excel 2002 spreadsheet that is
presented quartely. There is a column that contains
comments that I need for my own use but when the report
is presented to the Board only the comment of "Special
Mention" needs to be shown. My question is; How can I
make the text in the column containing the comments that
I don't want visible to be not visible? (the only

comment
showing would be "special mention") Also I need some way
to be able to toggle back and forth between making the
text visible and not visible. I was thinking of using

two
buttons, each containing the code that would serve my
purpose, but I am unsure of how to do this. Any help

with
a solution or pointing me in the proper direction will

be
greatly appreciated. Thank you.
Dave
.



  #5   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Toggle Text in a column to be visible or not visible

Thank you Michel
-----Original Message-----
another solution by change of format:
Sub Reset(cell As Range, Optional bShow As Boolean = True)
If bShow Then
cell.NumberFormat = "General"
Else
cell.NumberFormat = ";;;"
End If
End Sub

MP

"Patrick Molloy" a écrit dans

le message de
...
set the text's COLOR to the same as the cell's

background
color. This will make the writing seem to disappear.

the following test should be stepped through using
shift+F8
The first test line will make the text vanish & th
esecong will make it appear. First select some cells

with
text . try changing the cells color.

Sub test()

Reset Selection, False
Reset Selection, True

End Sub

Sub Reset(cell As Range, Optional bShow As Boolean =

True)
Dim clr As Long
With cell

If bShow Then
.Font.ColorIndex = 0
Else
clr = .Interior.ColorIndex
If .Interior.ColorIndex < 0 Then
clr = 2
End If
.Font.ColorIndex = clr
End If
End With
End Sub


Patrick Molloy
Microsoft Excel MVP

-----O

riginal Message-----
I have a report in an Excel 2002 spreadsheet that is
presented quartely. There is a column that contains
comments that I need for my own use but when the report
is presented to the Board only the comment of "Special
Mention" needs to be shown. My question is; How can I
make the text in the column containing the comments

that
I don't want visible to be not visible? (the only

comment
showing would be "special mention") Also I need some

way
to be able to toggle back and forth between making the
text visible and not visible. I was thinking of using

two
buttons, each containing the code that would serve my
purpose, but I am unsure of how to do this. Any help

with
a solution or pointing me in the proper direction will

be
greatly appreciated. Thank you.
Dave
.



.

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
How do I make one column or row always visible? Ao Excel Discussion (Misc queries) 8 April 23rd 23 09:01 PM
Keep Top Row and Side Column always visible Anti-Spam New Users to Excel 3 January 16th 08 03:34 PM
Wrapped text is not visible, how do I fix this? Barbara Sage Excel Worksheet Functions 4 December 21st 06 06:30 PM
how do I sum only visible data in a column Afolabi Excel Discussion (Misc queries) 3 July 26th 05 01:15 PM
Autoshapes not visible on spreadsheet but visible in print preview John Excel Discussion (Misc queries) 3 February 11th 05 10:23 PM


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