|
Hide Comments in Excel Completely - Even Indicators Will not Appear
Hide all comments in an Excel workbook. No indicators will be displayed and comments will not appear when you hover over or select a cell that contains a comment. The comments will remain within the Excel file and the same cells as before however, the user will not be able to see or read the comments. Also, the user will not be able to un-hide the comment unless they have access menu commands in Excel. However, the user will be able to edit the comment. As a result, this is not the best method to use to completely protect your comments from a user.
Where to install the macro: Module
Excel Macro to Hide Comments in Excel Completely - Even Indicators Will not Appear
Sub Hide_Comments_in_Workbook_Completely()
'This macro hides the comments and comment indicators - users wont know there is a comment within the excel workbook
Application.DisplayCommentIndicator = xlNoIndicator
End Sub
How to Install the Macro
- Select and copy the text from within the grey box above.
- Open the Microsoft Excel file in which you would like the Macro to function.
- Press "Alt + F11" - This will open the Visual Basic Editor - Works for all Excel Versions.
Or For other ways to get there, Click Here.
For Excel Versions Prior to Excel 2007 Go to Tools > Macros > Visual Basic Editor
For Excel 2007 Go to Office Button > Excel Options > Popular > Click Show Developer tab in the Ribbon. Then go to the Developer tab on the ribbon menu and on the far left Click Visual Basic
- On the new window that opens up, go to the left side where the vertical pane is located. Locate your Excel file; it will be called VBAProject (YOUR FILE'S NAME HERE) and click this.
- If the Macro goes in a Module, Click Here, otherwise continue to Step 8.
- Go to the menu at the top of the window and click Insert > Module
- Another window should have opened within the Visual Basic Editor's window. Within this new window, paste the macro code. Make sure to paste the code underneath the last line of anything else that is in the window.
- Go to Step 8.
- If the Macro goes in the Workbook or ThisWorkbook, Click Here, otherwise continue to Step 8.
- Directly underneath your excel file called VBAProject(your file's name here), click the Microsoft Excel Objects folder icon to open that drop-down list.
- Then, at the bottom of the list that appears, double-click the ThisWorkbook text.
- A new window inside the Visual Basic Editor's window will appear. In this new window, paste the code for the macro. Make sure to paste this code underneath the last line of any other code which is already in the window.
- Go to Step 8.
- If the Macro goes in the Worksheet Code, Click Here, otherwise continue to Step 8.
- Directly underneath your excel file called VBAProject(your file's name here), click the Microsoft Excel Objects folder icon to open that drop-down list.
- Within the list that appears you will see every worksheet that is in that excel file. They will be listed as such: Sheet1(NAME OF SHEET HERE) and under that will be Sheet2(NAME OF SHEET HERE). Select the sheet in which you want the macro to run and double-click that sheet.
- A new window inside the Visual Basic Editor's window will appear. In this new window, paste the code for the macro. Make sure to paste this code underneath the last line of any other code which is already in the window.
- Repeat steps b and c for every sheet you want the macro to work in. Putting the macro in one sheet will not enable it for any other sheets in the workbook.
- Go to Step 8.
- Close the Microsoft Visual Basic Editor window and save the Excel file. When you close the Visual Basic Editor window, the regular Excel window will not close.
- You are now ready to run the macro.
Similar Helpful Excel Resources
Hi all,
Can anyone suggest a means of printing comment indicators - i.e. the little red triangle in the corner of cells with comments in. Note: I know how to print the actual comments - however, the colleague I'm assisting only wants to show that there is a comment without actually showing said comment.
I'm using Excel 2007.
TIA,
SamuelT
hello,
I wanna know how I can hide the (i dont know how to call it in english) indicators where you click and change to the specific spreadsheet, so i can make the navigation from sheet to sheet only by buttons
tku very much
I would like to know how to print the comment indicator triangle on an excel
document. I am aware that you can print the comment where it is and that it
is also possible to print the comments at the bottom of the page all I want
is the triangle itself. PLEASE HELP!!!
I need to have a stacked column chart show the percentage (range 1 - 100%) of each data point (Customer 1 and 2) within each of the represented fiscal years. Attached is a sample workbook containing my chart work thus far and the sample data.
Ideally, I would like the percentages positioned within their respective column for each of the five years. I've shown this in the first fiscal year by inserting a drawn text box and keying the respective percentages. Obviously, I want the percentages tied to the source data for when that data changes. I thought I could accomplish this by adding a secondary y-axis with a scale of 1 - 100%; however, I can't get that technique to work. I've been able to add the total of Customer 1 and 2s sales for each fiscal year, represented by the data series over the stacked columns, and charting them as a line chart and using None for the Line and Marker options. These fiscal year total sales should remain, in addition to the respective percentages.
Also, for some reason my x-axis scale is now represented by dates of 01/01/2005, 01/01/2006, etc. However, the dates should be, as shown in the Data worksheet and the chart Data Table, 05/31/2005, 05/31/2006, etc. I've changed the axis scale with no success.
Thank you in advance for any input and suggestions,
John
Hello,
I am working on a dashboard and I would like to be able to use different parameters to select background colors for each metric without having to manually indidivual conditional formatting rules for each metric. Here is an example of my data:
Metric RedC YellowC GreenC Wk1Value Wk2Value Wk3Value ...
visits 8 3 5 9
failures >10
Hi:
I have a column of salary rates formatted as wingdings but when a user holds the cursor over the cell he/she can see the value.
I've locked and hidden the cells and protected the workbook so users can't select anything... is there anyway to prevent users from seeing the rates other than hiding the coulmns?
Thanks,
Andy
With the help of Venkat1926 I established a macro that successfully hides a number of rows that are unrquired (based on dates):
Code:
Sub test()
Dim rng As Range, c As Range
Set rng = Range(Range("a1"), Range("a1").End(xlDown))
For Each c In rng
If Not c >= Date Or Not c <= Date + 30 Then
c.EntireRow.Hidden = True
End If
Next c
End Sub
The Code works great but I have uncovered a further problem when testing. If in the rows I am trying to hide someone has inserted a comment then the macro fails. I beleive this is a fundemental problem with hiding rows / columns in general (when they contain comments / objects).
I was wondering if anyone else has come accross this before and found a solution. I have been trying to look at ways of hiding objects, then hiding the rows and then unhiding objects (I have a number of buttons on my sheet), however I have not met much success.
Thanks in advance for any help that can be offered.
Steve Loveday
I would like to remove all green little comments on a column of mine saying "The number in this cell is formatted as text or preceded by an apostrophe" without converting it to a number.
Is this possible to do via code? I tried recording a macro when I chose to ignore them but nothing showed up in the VBA editor :-\
dear all,
simple question, after i insert comment, the comments not automatically hide.
i should right click then hide comment.
how to make automatically hide the comment after inserting comments?
thanks
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal target As Range)
If target.Value = "leave" Then
If HasComment(target) = False Then
target.AddComment
End If
target.Comment.Text Text:=InputBox("Please add your comment") & Chr(10) & "[Updated On: " & Format(Now, "D Mmm YY H:MM") & "]" & Chr(10), Overwrite:=False
End If
End Sub
I copied the following code from another thread this morning and I'd like to know how I might edit it so that it will allow the comment to be added but then "hidden" atomatically.
Any thoughts, Guys (and Girls)?
The code is:
Function HasComment(ByVal target As Range) As Boolean
On Error GoTo ErrorTrap
If Len(target.Comment.Text) > 0 Then
HasComment = True
Exit Function
End If
ErrorTrap:
HasComment = False
End Function
|
|