This code takes a string and searches the sheet name for it. Set strData to
your textbox value and instead of msgbox, do a listbox.add
Dim strData As String
strData = "Dat"
For i = 1 To ThisWorkbook.Sheets.Count
For j = 1 To Len(ThisWorkbook.Sheets(i).Name) - Len(strData) + 1
If UCase(Mid(ThisWorkbook.Sheets(i).Name, j, Len(strData))) = UCase(strData)
Then
MsgBox ThisWorkbook.Sheets(i).Name
End If
Next
Next
--
-John
http://www.jmbundy.blogspot.com/
Please rate when your question is answered to help us and others know what
is helpful.
"abu (E-Mail Removed)" wrote:
> 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
> .
>