List Box: How do you enable link?

highndry

Board Regular
Joined
Nov 28, 2005
Messages
247
Hi

I have created this list box where I have around 10 tab (worksheet) names (AFD, AFS, CB&T, etc.). How can I redirect to those tab when someone select a name. I can use hyperlink but then I would have to type in all the tab name and it will take up too much space.

Thanks
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
What exactly do you want to do?

Is this listbox to allow the user to select a worksheet?
 
Upvote 0
Hi Norie

Yes, the file opens up with a summary page and on top in cel A3 I have "Cost Centers: List Box" where they will select the cost center and it will take them to that page.
 
Upvote 0
How about something like this:

<font face=Tahoma><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> ListBox1_Change()
    Sheets(ListBox1.Value).Select
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
</FONT>

HTH,

Smitty
 
Upvote 0
Yes I have created the list box with all the worksheet names, the worksheet names are in a another sheet which is linked to the listbox. However, when I select the worksheet names ex "AFD" it doesn't take me to that worksheet.
 
Upvote 0
Hi highndry

Did you create the listbox from the Forms toolbar or the Control Toolbox toolbar?

DominicB
 
Upvote 0
What Dominic is referring to is did you create the ListBox from the Forms toolbar or the Control Toolbox?

The code I posted is for an ActiveX control from the Control Toolbox. The code needs to go in teh sheet specific module.

Smitty
 
Upvote 0
It is in the sheet specific module, I have the following in the specific sheet:

Code:
'Private Sub ListBox1_Click()
Private Sub ListBox1_Change()
    Sheets(ListBox1.Value).Select
End Sub

Private Sub ComboBox1_Change()

End Sub

Private Sub ComboBox1_DropButtonClick()

End Sub

Private Sub ListBox1_Change()
    Sheets(ListBox1.Value).Select
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,835
Messages
6,121,880
Members
449,057
Latest member
Moo4247

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top