koden Posted January 29, 2007 Report Share Posted January 29, 2007 I have this macro: IF T20 contains SDN Variable set T21: A Variable set T22: B End if IF T20 contains OPC Variable set T21: C Variable set T22: D End IF A.s.o……. 20 times with diff. T20 contains. But if none of the conditions in T20 are true, I would like it to do this: Variable set T21: 1 Variable set T22: 2 But where do I put the ELSE command… My Brain is empty at the moment : Quote Link to comment Share on other sites More sharing options...
wbeldman Posted January 29, 2007 Report Share Posted January 29, 2007 It's worth the question I think: IF T20 = SDN is not an option? In that case you can use the Switch command. If in your situation *contains* is appropriate, try the following: N90=0 IF T20 contains SDN Variable set T21: A Variable set T22: B Variable set N90: 1 End if [20 times...] //general Else statement IF N90=0 //none of the above tests was true Variable set T21: 1 Variable set T22: 2 End if Quote Link to comment Share on other sites More sharing options...
koden Posted January 30, 2007 Author Report Share Posted January 30, 2007 so simple... I did it this way: I have a macro thats sets T21,T22 for each code SDN,OPC or what ever.... Every time i set T25 to 1 IN my main macro i have an if that checks if T25 is 1 If not it stops, so that i can fix it. Thanks... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.