View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Get Button Names (worksheet)

One way:

Dim btn As Button
For Each btn In ActiveSheet.Buttons
MsgBox btn.Caption
Next btn

In article ,
Rick S. wrote:

How can I get the names of buttons on a work sheet, I have many workbooks
with many worksheets and 4 buttons per sheet that the names are unknown, IE,
Button1, Button 2, Button3, Button101, etc.
I am trying to get the names so I can progmatically assign macros.
I knwo how to get the info when I click on them, but I don't have the time
nor the patience to click on every darn one. ;)