PDA

View Full Version : Hyperlinks for Combo from Sheet Tabs



sswcharlie
03-04-2015, 12:14 AM
Hi

Another option to my earlier post. Will give me a couple of options to choose from.
With code below it asks 'object required' In line starting with 'For Each...



Option Compare Text

Sub test()
ComboBox1.Clear
For Each Sheet In Sheets 'object required on this line

If InStr(Sheet.Name, "Site#") > 0 Then
ComboBox1.AddItem (Sheet.Name)
End If
Next
End Sub
Private Sub ComboBox1_Change()
If ComboBox1.Text <> "" Then
Sheets(ComboBox1.Text).Select
End If
End Sub


Have ComboBox1 on Sheet1. Code in 'Worksheet'


What am I missing ?

Thankyou
CharlesHarris

Yongle
03-04-2015, 11:12 AM
When continuing a discussion it is better to keep going on the same thread. So please close this thread by going to Thread Tools and selecting "Solved".
If the suggestions on the other thread does not answer your problem, then re-post the above on your first thread.

If you read the 2 suggestions on the thread you started earlier ("Listbox using List of Hyperlinks to other sheets" )- I think that you should now be able to solve your problem.