Hi everyone, Thank you for reading my questions. I look forward to your responses.
I am reading in data from a text file. For simplicity's sake, let's say I'm using the following code: Sub ProgramName() Open "filename.txt" For Input As #1 for i=1 to 10 Line Input #1, tempstring Range("a1").offset(i-1,0).Value = tempstring Next i Close #1 End Sub Question #1: Let's say that after reading in 10 lines, I decide that I want to read them in again. In other words, I'd like the next "Line Input #1, tempstring" command to start over at the beginning. Is there a way to do it without closing and reopening file #1? Question #2: (related) Is there a way to randomly access a line from a text file? That is, let's say that I know I want the read the millionth line from filename.txt above. Can I do it without reading in every line before it? Question #3: (unrelated) When I was using Excel 2000 with an XP operating system, I had no trouble breaking out of VBA code while it was running. Ctl-Break seemed to do the trick every time. Now, with Excel 2007 with Vista, the Ctl-Break doesn't work as well. Sure, it will send me into break mode if it's a very modest program (a simple but lengthy loop), but if the code gets complicated at all, forget it. It simply won't break. Does anybody know a what I can do? Thank you again, Howard --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---