Hi,
I need help for resolving this kind of problem, because I just start with VBA. I found and modify solution to export query from MS Access (using VBA) to separate workbooks in Excel so data can be filled in. Structure of table is simple
idTest (int)
Test1
Test2
In each exported workbook I insert few new rows with date columns (dd/mm/yy) and two fields under each date (fill1, fill2 (int, filled by someone else)) so now, my workbook have look something like:
+++++++++++++++|***date1***|***date2***| etc....
+++++++++++++++| fill 1 | f ill2 | fill 1 | fill2 | etc. ...
idTest | Test1|Test2| xxxx |xxxxx | xxxx | xxxxx | etc. ...
etc....
Well, now problems begin...
I must read each workbook so I can generate text file with this fields:
idTest|date1| fill 1|fill 2|
idTest|date2| fill 1| fill 2|
etc...
I am not good with VBA but I know that I have to read each idTest until last (eof or blank) and that will be a For loop, but for one idTest I must check whole Date(1-n) (that will be another For loop inside idTest loop) and read and add fill 1 and fill 2 for each idTest|Date row...
I try to find example to see structure and understand how I can do it for my case but there are only simple examples with using array, loops etc. I don't know how to use them together to solve problem which I have.
If someone have time to explain and show how to do that it will be nice.
I decide to create button on Form in Access which will onClick look in C:/test/ *.xls and read each xls data that I need and then put all data as I need in new table in Access or txt file.
If You think that I can resolve this problem on different way I will be glad to listen.
Thank You All,
Treloj
I need help for resolving this kind of problem, because I just start with VBA. I found and modify solution to export query from MS Access (using VBA) to separate workbooks in Excel so data can be filled in. Structure of table is simple
idTest (int)
Test1
Test2
In each exported workbook I insert few new rows with date columns (dd/mm/yy) and two fields under each date (fill1, fill2 (int, filled by someone else)) so now, my workbook have look something like:
+++++++++++++++|***date1***|***date2***| etc....
+++++++++++++++| fill 1 | f ill2 | fill 1 | fill2 | etc. ...
idTest | Test1|Test2| xxxx |xxxxx | xxxx | xxxxx | etc. ...
etc....
Well, now problems begin...
I must read each workbook so I can generate text file with this fields:
idTest|date1| fill 1|fill 2|
idTest|date2| fill 1| fill 2|
etc...
I am not good with VBA but I know that I have to read each idTest until last (eof or blank) and that will be a For loop, but for one idTest I must check whole Date(1-n) (that will be another For loop inside idTest loop) and read and add fill 1 and fill 2 for each idTest|Date row...
I try to find example to see structure and understand how I can do it for my case but there are only simple examples with using array, loops etc. I don't know how to use them together to solve problem which I have.
If someone have time to explain and show how to do that it will be nice.
I decide to create button on Form in Access which will onClick look in C:/test/ *.xls and read each xls data that I need and then put all data as I need in new table in Access or txt file.
If You think that I can resolve this problem on different way I will be glad to listen.
Thank You All,
Treloj