Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I make one column or row always visible? | Excel Discussion (Misc queries) | |||
Keep Top Row and Side Column always visible | New Users to Excel | |||
Wrapped text is not visible, how do I fix this? | Excel Worksheet Functions | |||
how do I sum only visible data in a column | Excel Discussion (Misc queries) | |||
Autoshapes not visible on spreadsheet but visible in print preview | Excel Discussion (Misc queries) |