Hi,
I have this VBA macro which imports data from a text file.
I do not know exactly how to make it good.
I have two sheets, named <INDATA> <Drawing_list>
On sheet <Drawing_List> I made a command button with this code:
When I click it, it imports information from a textfile as you see.
Allthough the information is printed out on sheet <Drawing_List> where the button is.
I bet it has something to do with "With ActiveSheet" statement.
I want the data from the textfile to be prionted in sheet <INDATA>.
How?
And my second question is how can this macro import data from all *.txt files under a certain path and print out the result in sheet <INDATA>
In above case it's only one file.
Is it like:
"TEXT;H:\MyPath\*.txt", _
.Name = "*.txt"
My third question is relative paths. In my office we store project files in H:\Projectname\*.txt
Projectname differs, so how can I make above code to:
1. Read all text files in a specified fodler
2. Put that data after eachother in sheet called <INDATA>
3. Make the path to the specified folder "relative" due to project names are different
Thanx
This is liek my first attempt to modify the code above to my needs.
best regards
Bookmarks