Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to lookup a sheet, number, then display in origonal sheet | New Users to Excel | |||
lookup single value in one sheet, return multiple results from theother sheet | Excel Worksheet Functions | |||
=LOOKUP on another Sheet | Excel Worksheet Functions | |||
Lookup from other sheet | Excel Discussion (Misc queries) | |||
Lookup cell contents in on sheet based on a formula in second sheet | Excel Worksheet Functions |