Importing multiple file

  • Thread starter Scott A Heinemann
  • Start date
S

Scott A Heinemann

I am a newbie to Microsoft VBA but have done script writing in other codes.
First I will outline what I want my code to do:- I am a veterinarian and I
have a machine in house do medical tests on animals. I generally print out
the results direct from this machine. It also has the ability to save the
file to a ascii file. The file has the extension .mon, which just refers to
the fact its a file to store the monitor parameters of the test . Here is
a brief outline of how a file might look:-
Filename: [patientid].mon
--------------------------------------------
S/N 125590 03/03/04 10.25am
[test] = [result] [units]
[test2] = [result2] [units]
[test3] = [result3] [units]
[test4] = [result4] [units]

and so on

each file has exactly the same layout but the number of tests may vary as
well as thier order on the report.

My aim is to write some sort of import code which will import the data
preferablly into an excel sheet to look like this
col1 col2 col3 col4 col5
col6 col7 col8 col9 col10
row1 Patientid [Test] [Test2] [Test3] [Test4] etc......
row2 [Patientid] [result] [result2] etc....
row3 [patientid]

thus each file is appended as a new row to the table and the macro runs
until it has processed all the files from one directory.

1. Is this possible?
2. What is the best source of info(aside from here) to learn about writing
this code?
3. Is this way to complicated for me to do?
4. Would access be a better choice to store the data?
 

Ask a Question

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.

Ask a Question

Top