how can i search for sheet with any part of sheet name
Give this code a try...
Dim WS As Worksheet
For Each WS In ThisWorkbook.Worksheets
If UCase(WS.Name) Like "*" & UCase(TextBox1.Text) & "*" Then
ListBox1.AddItem WS.Name
End If
Next
Note that I used the default names for the TextBox and ListBox... change
them as required.
--
Rick (MVP - Excel)
wrote in message
...
hi every on
i need code for userform of textbox and listbox to search for any
sheet in workbook with any part of that sheet name on i enter on
textbox to populate on listbox all sheets named contain that enterd
text on textbox .
any help appreciated .
thanks
|