Hi - Just a thought here of another approach for showing & hiding notes on a sheet.
1. Create a text box and name it 'Notes.
2. Set its properties to 'Don't move or resize with cells'.
3. Use this macro to toggle it visible or not.
4. Assign the macro to a command button on the sheet(s).
Sub Show_Hide_Notes()
ActiveSheet.Shapes("Notes").Visible = Not (ActiveSheet.Shapes("Notes").Visible)
End Sub
Advantages:
a) It will not be affected when rows/columns are added or removed.
b) Each sheet can have its own 'Notes' text box; the macro will work with them all.
Note:
When you initially create the textboxes using the 'Insert' menu, they are automatically named 'Textbox 1', 'Textbox 2' etc.
The following utility subroutine can be used to rename each one to just 'Notes' (or whatever you want).
Tip: Make the first text box and rename. Then just copy it and paste onto other sheets.
Sub Utilty_Change_Name_Of_Objects()
'
' Utility macro to change name of selected object... (TextBox, Buttons, etc.)
'
Dim newName As String
newName = InputBox("Enter name for this object:")
If newName <> "" Then Selection.Name = newName
End Sub
A sample program is attached to show this concept - notes are on 2 sheets with 1 macro to show/hide each.
Attachment 407183
Food for thought - my 2¢ worth.
- Stu
Bookmarks