renee Posted January 20, 2006 Report Share Posted January 20, 2006 I have a macro that looks for text in a document. Right now after it has found the particular text, I just execute the macro again on the keyboard to find the next text string which is always the same text. How would I use (or can I use) the repeat command until the text box (this is in Excel 2003) comes up that says Microsoft Excel cannot find the data you're searching for. (the title of this text box is: Microsoft Excel). I just don't understand the T1, N2 etc. So could someone just write it for me to copy and paste in my macro if it's not too lengthy or send me someplace where I can try and do it? THANK YOU SO MUCH. Renee Quote Link to comment Share on other sites More sharing options...
m204prgmr Posted January 22, 2006 Report Share Posted January 22, 2006 Renee, T is for Text. One example is you can look for specific text in each line ME reads in when you are processing the file. N is for integer. One example of using this to find the starting position of something in your line (T1). Have you tried to process your Excell as a .csv file? Save the Excell sheet as a .csv if you have not and use it that way and you will not have to use the keyboard commands. Quote Link to comment Share on other sites More sharing options...
renee Posted January 23, 2006 Author Report Share Posted January 23, 2006 I guess I didn't make myself clear ... my macro is exactly what I want. I just want to be able to repeat it until all the text strings are found. Sometimes I may have only 3 of the lines I need to tweak, sometimes it's 10. So I want to repeat the macro until it can't find that text string anymore. For instance under Repeat there is a "repeat until..." command. Well I want my macro to repeat until it can't find the text I'm looking for. But I'm not sure how to write that. Make sense? ~ Renee Quote Link to comment Share on other sites More sharing options...
m204prgmr Posted January 23, 2006 Report Share Posted January 23, 2006 Renee, What did you want to happen after ME has finished searching. If I have this right, you are searching a .txt document with ME for certain text and when that string is found, you start up an Excel document and search Excel for the same text? If this is correct, where is the initial search string coming from? Can you copy and paste your code please into a reply? Thanks Robert 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.