LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default passing a comboxbox result into sheets.select

Thank you....i wasn't sure how much of the code I should put in the post...but
all of you answered my question.
It works great!

"lcifers" wrote:

Try this:

'In the change event of your combobox
Private Sub ComboBox1_Change()

If Not Me.ComboBox1.Value = "" Then
Sheets(Me.ComboBox1.Value).Select
End If

End Sub

'To load sheet names when initializing the form
Private Sub UserForm_Initialize()

Dim s As Excel.Worksheet

For Each s In ThisWorkbook.Worksheets
Me.ComboBox1.AddItem s.Name
Next

End Sub

HTH.

- Luther




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ComboxBox with Dynamically Defined Source, and LinkedCell error GlennUK Excel Discussion (Misc queries) 1 June 4th 08 03:11 PM
passing values to other sheets [email protected] New Users to Excel 1 February 23rd 08 02:03 AM
Comboxbox in Commandbar Bhavtosh Excel Programming 3 January 20th 05 03:19 PM
Looping through Sheets and passing values to an Array Michael Rhein Excel Programming 2 February 13th 04 10:54 AM
Passing SQL Query Result Into A Variable Elliot[_2_] Excel Programming 4 January 9th 04 09:55 AM


All times are GMT +1. The time now is 05:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"