SOLVED

Unable to delete macro - unhide workbook

Brass Contributor

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?

Delete Macro Error.jpg

Thanks,

Amy 

6 Replies
best response confirmed by VI_Migration (Silver Contributor)
Solution

@AmyYang 

Activate the View tab of the ribbon.

You should find the Unhide button in the Window group.

S1027.png

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.

@Hans Vogelaar 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.

Thank you Hans for your helpful reply!
Unhide 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
Thank 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 Vincent

@chimera98026 

Good to hear that!

1 best response

Accepted Solutions
best response confirmed by VI_Migration (Silver Contributor)
Solution

@AmyYang 

Activate the View tab of the ribbon.

You should find the Unhide button in the Window group.

S1027.png

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.

View solution in original post