View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Pedro Serra[_3_] Pedro Serra[_3_] is offline
external usenet poster
 
Posts: 4
Default How do I change a worksheet in Excel by using a combo-box?

Tom I'm starting with programing and I think I understood the code u wrote to
me but how can I Know the name of the combo-box I've created, because in your
example u call it Combobox1, right, but in Excel the combo-box as a different
name, right?

"Tom Ogilvy" wrote:

Possibly

Private Sub Combobox1_Click()
if Combobox1.ListIndex < -1 then
Worksheets(Combobox1.Value).Select
end if
End Sub
This assumes the text in the combobox is the name of the sheet.
--
Regards,
Tom Ogilvy

"Pedro Serra" <Pedro wrote in message
...
I want to change the worksheet in Excel by choosing it in a combo-box that
displays 18 diferent options, and each one of these options displayed in

the
combo-box, corresponds to a diferent worksheet, is it possible?