How to use spinbutton to alternate among sheets?

marlonsaveri

Board Regular
Joined
Jan 28, 2011
Messages
68
Hi,

I imagined a command to open a spreadsheet containing a typed text (textbox1) in its name.

Code:
CityName = textbox1.text
For i = 1 To Sheets.count
If InStr(1, CityName, sheets(i).name, 1) <> 0 and InStr(1, CityName, sheets(i).name, 1) <> Null Then
Number_of_Found_Sheets(j) = i
 j = j+1
 End If
 Next i
 sheets(Number_of_Found_Sheets(0)).select
Then, I need make a form with labels and spinbuttons to alternate among these sheets. How to do it?
 

Some videos you may like

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Watch MrExcel Video

Forum statistics

Threads
1,100,209
Messages
5,473,170
Members
406,849
Latest member
gustavor0

This Week's Hot Topics

Top