Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toggle Text to be visible and Not visible
I sent in a post a couple of days ago and did receive some
replies that I am grateful for; but I am still stuck. I don't have much experience with VBA and I need help. I have a report that gets presented quartley. There is a column on the spreadsheet that contains 2 types of comments. One type of comments are for myself to keep track of things. The other comments are meant for the Board members to see when the report is presented. What I want to do is have two buttons on the spreadsheet; one button to remove all the comments that the board does not want to see. The only comment the board wants to see are the words "Special Mention". The other button is to restore all of my comments that I need for myself while I'm working on the report. In other words when I click on a button named (let's say)Special Mention, all text in the column should go away except for the words "Special Mention. So far I have been able to either make all the text either be visible or not with the following code: Private Sub cmdViewComments_Click() Worksheets("Sheet1").Range("Comments").Font.Color = RGB(0, 0, 0) End Sub Private Sub cmdSpecialMention_Click() Worksheets("Sheet1").Range("Comments").Font.Color = RGB(255, 255, 255) End Sub I need help with the code to enable me to only display the words/text "Special Mention" in the Comments column. I know this is a long post and I appreciate the patience in reading it. Thank you for any help provoided. Dave |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toggle Text to be visible and Not visible
How about a couple of different options.
Use Data|filter|autofilter to hide the rows (too much???) that don't have "special mention" on them. If that hides, too much, how about conditional formatting. Put an indicator in a cell (out of the way, but I'm gonna use A1 for my example and E for my columns of comments): select column E (or your column) and format|Conditional formatting use formula is: =AND($A$1=1,E1<"special mention") toggle the value in the indicator cell between 1 and anything else. Dave Y wrote: I sent in a post a couple of days ago and did receive some replies that I am grateful for; but I am still stuck. I don't have much experience with VBA and I need help. I have a report that gets presented quartley. There is a column on the spreadsheet that contains 2 types of comments. One type of comments are for myself to keep track of things. The other comments are meant for the Board members to see when the report is presented. What I want to do is have two buttons on the spreadsheet; one button to remove all the comments that the board does not want to see. The only comment the board wants to see are the words "Special Mention". The other button is to restore all of my comments that I need for myself while I'm working on the report. In other words when I click on a button named (let's say)Special Mention, all text in the column should go away except for the words "Special Mention. So far I have been able to either make all the text either be visible or not with the following code: Private Sub cmdViewComments_Click() Worksheets("Sheet1").Range("Comments").Font.Color = RGB(0, 0, 0) End Sub Private Sub cmdSpecialMention_Click() Worksheets("Sheet1").Range("Comments").Font.Color = RGB(255, 255, 255) End Sub I need help with the code to enable me to only display the words/text "Special Mention" in the Comments column. I know this is a long post and I appreciate the patience in reading it. Thank you for any help provoided. Dave -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Wrap Text Not Visible | Excel Discussion (Misc queries) | |||
Visible text in a cell | New Users to Excel | |||
Wrapped text is not visible, how do I fix this? | Excel Worksheet Functions | |||
Autoshapes not visible on spreadsheet but visible in print preview | Excel Discussion (Misc queries) | |||
Toggle Text in a column to be visible or not visible | Excel Programming |