leeloo0505
Board Regular
- Joined
- Mar 28, 2003
- Messages
- 130
Hello,
I am writing a macro in Excel that hopefully will allow a user to import a .csv from a certain location into an Access DB.. the .csv does not have anything to do with the Excel window I have open.
I have created the DB and the text file specification layout to be used when importing this 'third' .csv. And the code below works great within Access but when I try from within Excel it cannot find the "DowntimeToolImportLayout". I get the error 'the DowntimeToolImportLayout specification does not exist' when I know it does. I have adjusted my References but to avail.. here is the code.
docmd.transfertext acImportDelim, "DowntimeToolImportLayout", "tblDowntimeToolImport", "K:\fixed\data\downtime\cust_ord_post\20031008_cust_ord_post_2042_p1.csv", True, "", 28591
When I coded this in excel, it recognized it as VB does helping me with the agruements..so that is okay.. I just can't get it to find the text file specification name when it finds it fine when I am within Access.
Thanks,
leeloo
I am writing a macro in Excel that hopefully will allow a user to import a .csv from a certain location into an Access DB.. the .csv does not have anything to do with the Excel window I have open.
I have created the DB and the text file specification layout to be used when importing this 'third' .csv. And the code below works great within Access but when I try from within Excel it cannot find the "DowntimeToolImportLayout". I get the error 'the DowntimeToolImportLayout specification does not exist' when I know it does. I have adjusted my References but to avail.. here is the code.
docmd.transfertext acImportDelim, "DowntimeToolImportLayout", "tblDowntimeToolImport", "K:\fixed\data\downtime\cust_ord_post\20031008_cust_ord_post_2042_p1.csv", True, "", 28591
When I coded this in excel, it recognized it as VB does helping me with the agruements..so that is okay.. I just can't get it to find the text file specification name when it finds it fine when I am within Access.
Thanks,
leeloo