Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want to do something like: [code

Status
Not open for further replies.

PhilippeSignoret

Programmer
May 19, 2001
21
0
0
MX
I want to do something like:
Code:
Dim stuff as String
If stuff has "[URL unfurl="true"]http://"[/URL] in it Then
 Msgbox stuff & " is a website!"
Else
 Msgbox stuff & " is not a website!"
End If

Can anyone help me with this?
Thanks!
Philippe
 
Try this code.

The function InStr searches one string for the existance of another.


If (InStr(1, stuff, " Then
MsgBox stuff & " is a website"
Else
MsgBox stuff & " is not a website"
End If


This should do the trick for ya. This routine is case sensative, so if you make stuff = " it will return false; as a challenge to yourself, you may want to make this routine return true for any variation of Best Regards,
Nathan Martini
Advanced Computer Solutions
 
Hi,

Place the statement: 'Option Compare Text' in your form's General module to avoid the case sensitive problem.

Have a good one!
BK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top