View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
shanej shanej is offline
external usenet poster
 
Posts: 1
Default Old button code not working in Excel2002

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