theSteve Posted May 3, 2010 Report Share Posted May 3, 2010 Here's what I'm trying to do: I have an Excel cell with this content, which I'm copying to clipboard: "I like to eat %T[1]%." (Assume %T[1]% is set to "Apples") I'm setting string variable %cellContent% to the clipboard contents, then appending %cellContent% to a text file, named Fruit.txt. I want Fruit.txt to read: "I like to eat %T[1]%." I DO NOT want Fruit.txt to read: "I like to eat Apples." Is this possible? Quote Link to comment Share on other sites More sharing options...
kevin Posted May 3, 2010 Report Share Posted May 3, 2010 I want Fruit.txt to read: "I like to eat %T[1]%." I DO NOT want Fruit.txt to read: "I like to eat Apples." If you use a variable that exists, then it will be evaluated. But if you use a variable that does not exist, then it will not. Change "I like to eat %T[1]%." to "I like to eat %NoVariable%." Quote Link to comment Share on other sites More sharing options...
theSteve Posted May 3, 2010 Author Report Share Posted May 3, 2010 If you use a variable that exists, then it will be evaluated. But if you use a variable that does not exist, then it will not. Change "I like to eat %T[1]%." to "I like to eat %NoVariable%." That works for me, Kevin. Thanks a million. theSteve Quote Link to comment Share on other sites More sharing options...
Jeff Cleveland Posted May 7, 2010 Report Share Posted May 7, 2010 For me it is a big problem not being able to turn off variable substitution. I want to process my macro file to extract variable references and other information with MEP but cannot because I get variable substitution when I do not want it. Jeff 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.