try this
If Instr(TB1, "0900-0930") > 0 then .....
INSTR return an integer....
HTH
-----Messaggio originale-----
Da: Jean Halstad [mailto:J_Halstad@S...]
Inviato: giovedì 14 marzo 2002 12.32
A: ASP Web HowTo
Oggetto: [asp_web_howto] RE: inStr
Sorry, eating humble pie. I tried it and it did get rid of the error
message. However the string is still not being found, although it is there.
Is the type mismatch error a clue?
Can't do that. All I know is the string might be in there somewhere amongst
other strings, so sometimes it will start from 1, sometimes from 10, etc.
The string I am searching for is always 9 characters long.
-----Original Message-----
From: Craig Flannigan [mailto:ckf@k...]
Sent: 14 March 2002 09:39
To: ASP Web HowTo
Subject: [asp_web_howto] RE: inStr
Use this...
Instr(StartFrom, TB1, "0900-0930",1)
Where StartFrom is a character number. For example, if you wished to search
your string 3 characters in from the left, you'd use '3'
If you're wanting to search from the beginning of the string, just enter 1.
Zero doesn't work.
---> If Instr(1, TB!, "0900-0930", 1) Then ...
HTH,
Craig.
-----Original Message-----
From: Jean Halstad [mailto:J_Halstad@S...]
Sent: 14 March 2002 09:30
To: ASP Web HowTo
Subject: [asp_web_howto] inStr
Have written this:
if not instr(TB1, "0900-0930", 1) then .....
TB1 is a variable containing text
Am getting this error
Type mismatch: '[string: "0930-1000"]'
Have done a response.write, and sure enough the string is not being found,
although I know it is there.
What am I doing wrong?
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service on behalf of
Kingfield Heath Ltd. For further information visit
http://www.star.net.uk/stats.asp
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service on behalf of
Kingfield Heath Ltd. For further information visit
http://www.star.net.uk/stats.asp
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.