HELP - Accidently Wiped Out CommandButtons

  • Thread starter Thread starter Minitman
  • Start date Start date
M

Minitman

Greetings,

I was just finishing updating all 132 sheets when I accidently
overwrote my control sheet (Macros can be dangerous). I tried loading
my last save and coping that workbooks control sheet int the later
one, but when I tried to rename the new buttons with the same name as
the old (now missing) buttons, I got an ambiguous name error message.
I looked everywhere I could think of, but I could not find any if the
old buttons. If I can't find out how to fix this one page, then I
will have to repeat the last 3 hours of entry.

Anyone have any clue as to where to look to fix this problem?

TIA

-Minitman
 
Maybe you just hid the buttons

Sub ShowButtons()
Dim oleObj as oleObject
Dim cbtn as MSForms.Commandbutton
for each oleObj in Activesheet.OleObjects
if typeof oleObj.Object is MsForms.CommandButton then
oleObj.Visible = True
set cbtn = oleObj.Object
msgbox cbtn.Name
end if
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top