View Single Post
  #9   Report Post  
rtour957 rtour957 is offline
Junior Member
 
Posts: 16
Default

Quote:
Originally Posted by GS[_2_] View Post
rtour957 expressed precisely :
Sorry, I did not realize macro has to be run after entering "no". Now
when I do - the first script it gives me "#name?" in celLs B1:B4 and the
second code highlight in yellow the first line and gives a syntax error
on "If Not Intersect(Target, Range("A1:A4")) Is Nothing Then Call" line.
Words "True" and "False" down below are in red as well.
Any ideas what's going on wrong?

Thanks, Art


Well.., you probably have some word wrap (every line is a single
statement and so your reader wrapped some of the words to a new line)
happening if you did a copy/paste. For instance, the code in the
Worksheet_Change sub is a single line. You'll need to backspace
"RejectAdjacentData(Target)" so it follows the line above like so...

If Not Intersect... Then Call RejectAdjacentData(Target)

...so the entire statement is one line.

Do the same for the "true" and "false" as well as those belong to the
comment after the line above each word...

sFormula = sFormula &... '//=condition true
sFormula = sFormula &... '//=condition false

Let me know how this works out! I tested the code (as well as the
Conditional Formatting suggestion I made) until I was
'blue-in-the-face', seems like, and it worked really nice.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
Thanks Gary,
Works like a magic and does exactly what I was looking for.
Sorry, I'm comletely ignorant in VB.

Art