Re: find in internal string
Use INSTR()
for example
assuming that you have defined Exlbook
vb Code:
Sub aaa()
For i = 1 To Exlbook.Sheets.Count
'vbTextCompare will ensure that even Sbilanci(with a capital S)
'is also picked up.
If InStr(1, Exlbook.Sheets(i).Name, "sbilanci", vbTextCompare) Then
MsgBox Exlbook.Sheets(i).Name
End If
Next i
End Sub
Hope this helps...
Re: find in internal string
koolsid i love you!
Tks from Napoli. Virtual Pizza for you!
Re: find in internal string
Quote:
Originally Posted by koolsid
Use INSTR()
for example
assuming that you have defined Exlbook
vb Code:
Sub aaa()
For i = 1 To Exlbook.Sheets.Count
'vbTextCompare will ensure that even Sbilanci(with a capital S)
'is also picked up.
If InStr(1, Exlbook.Sheets(i).Name, "sbilanci", vbTextCompare) Then
MsgBox Exlbook.Sheets(i).Name
End If
Next i
End Sub
Hope this helps...
koolsid i "love you!":thumb: :wave: :p
Tks from Napoli. Virtual Pizza for you!