R
Ripper
How do I import a file to Excel with a set of specifications? I don't want
to have to set the fixed length every time I want to import the file.
to have to set the fixed length every time I want to import the file.
Dave,
How do I modify/add to this code so that once the text file has been opened
I can go back and forth to it not knowing the name of the file until after
it's been selected?
ie I think I need to declare a different variable for the name of the file I
just opened. The "myFileName" refers to the full path and I think I just
want the name of the file.
eg in my code I have
Windows("SupporterStats.txt").Activate
But I want to use the code, below, to open any text file and then run some
more code, before acting again on the unknown name text file.
Rob
Thanks Dave, very useful as usual!
Could you explain though why, as you say, "I'd stay away from using the
filename and I'd stay away from using the windows
collection, too"?
I've done that a lot in various codes I've created and also from code I've
gleaned here, without a problem.
Could you also please explain the dot that proceeds lines of code within
With & End With statements. What are the general rules with that?
Rob
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.