Old button code not working in Excel2002

S

shanej

I have the following code, originally developed in Excel
97, that no longer works in Excel 2002. I get an error
when the code tries to read the address of the button. I
think it is because the "buttons" object (MS Forms) is no
longer supported. Can anyone please suggest a fix,
without resorting to changing all the buttons to controls
and re-assigning code to each new button. Thanks in
advance:

Dim mybutton as button
dim buttaddress as string

for each mybutton in activesheet.buttons
buttaddress = Sheets(scheduleName).Buttons
(buttonNo).TopLeftCell.Address
*do stuff here based on the address of the button
next my button
 

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

Top