![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Newcastle, UK
Posts: 1,174
|
I have several buttons in a workbook.
These button are from the Forms toolbar. Once I've assigned a name to them how can I change that name later?? The reason I ask is I've Copied one sheet of data to ALL the others and now of course ALL the button have the same name. The problem being they run a macro with Application.Caller in to goto certain sheets, NOW they don't of course. Kind regards
__________________
"Have a good time......all the time" Ian Mac |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Stockton, California
Posts: 281
|
Select the button, then just type your new name in the name box (upper left, to the left of the formula bar) and press enter, and that should do it. I hope your version of excel has the name bar, I'm using 2000 and it does.
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Newcastle, UK
Posts: 1,174
|
If only 'twas that easy. I tried that.
I typed the new name in, Pressed enter, The new name remained in the name box. selected a cell, selected the button and low and behold, back to the old name???????? by the way, I'm using XL97 SR-2. _________________ Share the wealth!! Ian Mac [ This Message was edited by: Ian Mac on 2002-04-05 01:41 ] |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Stockton, California
Posts: 281
|
Maybe try deleting the unused old names from the list first? Insert->Name->Define then delete the ones you dont want, the try the naming again. hopefully that works
|
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Newcastle, UK
Posts: 1,174
|
Unfortunatly the Button Names don't appear in the Name>Define dialogue box. I'd like to know where they bleedin go thought
Thanks for still trying.
__________________
"Have a good time......all the time" Ian Mac |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Feb 2002
Location: Stockton, California
Posts: 281
|
doh
|
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Mar 2002
Location: Northern Ireland
Posts: 113
|
I use excel 97.
Try this. Mouse over the button, right click and then edit text, you can also reassign a macro to the button. |
|
|
|
|
|
#8 |
|
Board Regular
Join Date: Mar 2002
Location: Northern Ireland
Posts: 113
|
I use excel 97.
Try this. Mouse over the button, right click and then edit text, you can also reassign a macro to the button. |
|
|
|
|
|
#9 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Newcastle, UK
Posts: 1,174
|
Quote:
Also the macro I'm dynamically changes with the use of the Application.Caller. My problem is I assigned names to all the buttons and used Sub SelectTotals() Sheets("TeamTotals" & Application.Caller).Select Range("h4").Value = "" End Sub to select different sheets depending on what the button is called.
__________________
"Have a good time......all the time" Ian Mac |
|
|
|
|
|
|
#10 |
|
New Member
Join Date: May 2002
Location: India
Posts: 2
|
Hi,
You can change the name of the button using a simple macro. Just select the button and try running the following macro. This will first display the current name and then I am changing the name to "NewName" and then the object.name will become NewName. So you can have a generic routine which can ask for the name and then set that name using object.name = The example routine: -------------------- Sub ChangeName() Dim Obj As Object Set Obj = Selection MsgBox Obj.Name Obj.Name = "NewName" MsgBox Obj.Name End Sub I hope it helps. Is there any direct way?? Anand |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|