Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Sheet Lookup

I was wondering what code would I use on a userform to lookup up all sheets
with the name "round" in it. i.e. "round 1". I have about 60 worksheets in
this program and I want the ability just to look back over previous results.
Also what would I use on the user a list box or combo box to do this?


Thanks in advance

Greg


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default Sheet Lookup

Private Sub UserForm_Initialize()
GetSheetsWithRound
End Sub
Sub GetSheetsWithRound()
Dim Sht As Worksheet
Dim ShtArr() As String
Dim i As Long
ReDim ShtArr(0)
For Each Sht In ThisWorkbook.Worksheets
If InStr(UCase(Sht.Name), "ROUND") < 0 Then
ReDim Preserve ShtArr(UBound(ShtArr) + 1)
ShtArr(UBound(ShtArr)) = Sht.Name
End If
Next Sht

'Not you have a nice Array of sheet names which you can loop through to
populate the combo box using the
'.AddItem method
For i = 1 To UBound(ShtArr)
ComboBox1.AddItem ShtArr(i)
Next i
End Sub


"Greg B" wrote in message
...
I was wondering what code would I use on a userform to lookup up all sheets
with the name "round" in it. i.e. "round 1". I have about 60 worksheets
in
this program and I want the ability just to look back over previous
results.
Also what would I use on the user a list box or combo box to do this?


Thanks in advance

Greg




Reply
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
Macro to lookup a sheet, number, then display in origonal sheet abbsy3 New Users to Excel 3 November 9th 10 12:19 PM
lookup single value in one sheet, return multiple results from theother sheet Chuck[_3_] Excel Worksheet Functions 1 April 4th 08 06:17 AM
=LOOKUP on another Sheet kermitforney Excel Worksheet Functions 6 March 17th 06 06:03 PM
Lookup from other sheet Pivotrend Excel Discussion (Misc queries) 7 March 13th 06 07:12 AM
Lookup cell contents in on sheet based on a formula in second sheet Michael Wright via OfficeKB.com Excel Worksheet Functions 1 April 30th 05 04:11 PM


All times are GMT +1. The time now is 10:59 AM.

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"