Thread: Value LIKE
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Pyrite Pyrite is offline
external usenet poster
 
Posts: 78
Default Value LIKE

Thank you all for your help.

Good Afternoon Mike, I wasnt being impatient by the way, I am in the UK and
have been trying to think of ways around my problem for hours htis morning. I
did update our conversation from yesterday as I am still having the same
problems and was hoping for a response from a UK user so I could at least try
adding another If The Exit Sub to try and get around my : problem that way.
As you rightly state it wont tork for the time format.

I think it may be time to throw in the towel. This problem appears almost
unsolvable, I have tried at least 5 different sets of code as well as
countless alterations made by me (somewhat ham fistedly no doubt) but none
the less I just cannot see there being a solution.

Thank you for the time you have given to trying to help me find the
solution. Alas I fear I may have to use On Error resume Next or change the
error message to offer instruction to the user. It just will not stop giving
an error when I enter the time with : inclusive.
Thanks again

"Mike H" wrote:

Try this

If activecell.Value Like "*:*" Then

Note this won't find a colon in a formula or in a time format

Mike

"Pyrite" wrote:

Hi,

I'm trying to write a line of code to test a value that has been input for
containing a :

I was thinking something similar to:

If Target.Value Like "##:##" Then

However, the like will not recognise Target.Value and as such would only
look for that eact line being entered. Any suggestions? It is to work on a
Workbook Change and basically will be If the string contains a : then Exit Sub