Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get Button Names (worksheet)
try
Sub getshapenames() For Each Sh In ActiveSheet.Shapes MsgBox Sh.Name Next End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Rick S." wrote in message ... 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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
using the Excel generic worksheet names instead of user-given names in code | Excel Discussion (Misc queries) | |||
MAKE A LIST OF NAMES FROM REPEATED NAMES IN THE SAME WORKSHEET | Excel Discussion (Misc queries) | |||
how to copy workbook names and worksheet names to columns in acces | Excel Programming | |||
Changing VB Component Names to match Worksheet names using VBE | Excel Programming | |||
return all worksheet tab names and chart sheet tab names in report - an example | Excel Programming |