Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
jculp
- Newbie
- Posts: 14
- Joined: Wed Aug 06, 2008 5:40 pm
Post
by jculp » Mon Aug 18, 2008 4:08 pm
There must be something I'm missing about comparing strings. Why doesn't this code work right?
******
Poster's edit: NEVER MIND: Too many VBA habits, too hard to see simple prompts (lack thereof)
IF>
Code: Select all
Let>v1=13591P003
Let>v2=26113P001
If v1=v2
messagemodal>same
Else
messagemodal>different
Endif
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Mon Aug 18, 2008 4:21 pm
The correct syntax for the If command is:
If>v1=v2
So your code should be:
Code: Select all
Let>v1=13591P003
Let>v2=26113P001
If>v1=v2
messagemodal>same
Else
messagemodal>different
Endif
-
jculp
- Newbie
- Posts: 14
- Joined: Wed Aug 06, 2008 5:40 pm
Post
by jculp » Mon Aug 18, 2008 4:23 pm
Thanks, Marcus. I had just gone back to fundamentals , and used the command reference to insert the If statement and realized what was missing.