View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 207
Default Navigate Sheets using In-Sheet Combo Boxes

It may not be exactly what you want, but Bill Gates already gave us
something that does pretty much what you have described. If you right
click on the arrow keys that are jst to the left of the sheet names you
get basically a list box with all the sheets. You pick the on you want
and spare yourself the macro writing. If you really want it in a
Combobox, you can insert a combobox from the Control Toolbar on your
worksheet, and associate this code with it

Private Sub ComboBox1_Click()
ws = ComboBox1.ListIndex
Worksheets(ws + 1).Activate
End Sub

Private Sub ComboBox1_GotFocus()
ComboBox1.Clear
For Each ws In Worksheets
ComboBox1.AddItem ws.Name
Next ws
End Sub

Good luck.

Ken
Norfolk, Va




imitk wrote:
I've got a menu ComboBox and I want selecting an item to activate a
corresponding sheet in the workbook. Thinking of writting a macro that
calls several subsequent macros (already written) that activate the
sheets, but I'm a little fuzzy on coding for In-sheet controls.
Suggestions?

imitk