View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
neda5 neda5 is offline
external usenet poster
 
Posts: 4
Default Link button name to a cell

Thanks.
The buttone I have created are from the Control Box Toolbar and have a
simple macro assigned to them to tell them to jump to a specific sheet when
pressed.
I am getting a list of my tab names with the help of a macro so that when
the tab names change the list on the index tab changes too. (It is actually a
udf as follows:
Public Function TabI(TabIndex As Integer, Optional MyTime As Date) As String
TabI = Sheets(TabIndex).Name
End Function
and a formula I have in the indextab)
What I really want to do is link the button names to that list so that when
I change the name of a tab ot gets reflected in the list and the respective
button.
Furthermore, the macro I am using is the following:

Private Sub CommandButton1_Click()
Worksheets("Name of Sheet").Activate
ActiveSheet.Range("A1").Select
End Sub

Ideally I would like to have the name of the sheet to be activated at the
click of the button instead of being typed to be linked to the specific
sheet. Is that doable?

Thanks. Neda

"OssieMac" wrote:

Hi Neda,

A couple of questions. Not really sure if I can help but I will have a look
at it and see what can be done.

What sort of buttons do you have? Did you create them from the button on the
Forms toolbar or from the button on the Control Box Toolbar?

How are you getting the sheet names into the Index tab? (By formula or with
a macro or are you just typing them in?)

Regards,

OssieMac


"neda5" wrote:

Hi,
I have an index sheet with buttons that I want to have such that when each
button is clicked it goes to a specific worksheet within the file and for
that I have brought a list of all sheet names in that index tab. I would like
to have the button names linked to the respective cells that contain the
names of the tabs so that if I change the tab names the buttons automtically
update.
Can anyone help me with how I link the button name (caption) to a cell?
Thanks in advance.
Neda