Forum Discussion
Unable to delete macro - unhide workbook
Hi,
When I created a macro then tried to delete it, I got error message that I need to unhide the workbook using Unhide command. May you advise where I can do this command?
Thanks,
Amy
Activate the View tab of the ribbon.
You should find the Unhide button in the Window group.
Click this button, select a workbook from the list, then click OK.
Alternatively, press Alt+F11 to activate the Visual Basic Editor. See if you can find the macro there. If so, simply delete its text.
- Ray_FryeCopper ContributorUnhide workbook by name:
Sub HidePERSONAL()
Dim i
On Error Resume Next
For i = 1 To Windows.Count
'Debug.Print Windows(i).Visible
'Debug.Print Windows(i).Caption
If Windows(i).Caption = "PERSONAL.XLSB" Then
Windows(i).Visible = False
On Error GoTo 0
Exit For
End If
Next i
End Sub Activate the View tab of the ribbon.
You should find the Unhide button in the Window group.
Click this button, select a workbook from the list, then click OK.
Alternatively, press Alt+F11 to activate the Visual Basic Editor. See if you can find the macro there. If so, simply delete its text.
- chimera98026Copper ContributorThank you!!! I was have the same problem as Amy. Your response to her work perfectly. I was able to delete my macro without further error message.
Margo VincentGood to hear that!
- AmyYangBrass ContributorThank you Hans for your helpful reply!
- akhona1986Copper Contributor
HansVogelaar thanks. My eyes were starting to get teary because the file (the one with macros) was not opening (or showing) so I thought I had lost all that work. Thanks a million.