Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default Get Button Names (worksheet)

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. ;)

--
Regards

Rick
XP Pro
Office 2007

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default Get Button Names (worksheet)

I miss worded my query, I need to know the name of the Caption for the Button.
--
Regards

Rick
XP Pro
Office 2007



"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. ;)

--
Regards

Rick
XP Pro
Office 2007

  #4   Report Post  
Posted to microsoft.public.excel.programming
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. ;)

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Get Button Names (worksheet)

This will change the text from a list of the shape names with the text in
the cell to the right

Sub NameShapes()
Sheets("checks").Select
For Each c In [setup!a4:a15]
ActiveSheet.Shapes(c).TextFrame. _
Characters.Text = c.Offset(0, 1)
Next c
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Rick S." wrote in message
...
I miss worded my query, I need to know the name of the Caption for the
Button.
--
Regards

Rick
XP Pro
Office 2007



"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. ;)

--
Regards

Rick
XP Pro
Office 2007


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
using the Excel generic worksheet names instead of user-given names in code Paul Excel Discussion (Misc queries) 5 June 26th 09 08:44 PM
MAKE A LIST OF NAMES FROM REPEATED NAMES IN THE SAME WORKSHEET r.kordahi Excel Discussion (Misc queries) 2 January 3rd 09 08:10 AM
how to copy workbook names and worksheet names to columns in acces gokop Excel Programming 4 August 27th 07 11:26 AM
Changing VB Component Names to match Worksheet names using VBE Philip Excel Programming 1 April 12th 05 05:37 PM
return all worksheet tab names and chart sheet tab names in report - an example DataFreakFromUtah Excel Programming 2 October 6th 04 08:09 PM


All times are GMT +1. The time now is 11:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"