Hello
I have run into the following problem with my database. I have 2 excel files:
temporary.xls - this is an import of an access query, generated from access 2010, and adding / running some formatting amcro on it.
test.xls - this file already exists in a network folder, I'm opening it up from access database, and run some formatting macro on it.
My aim would be copying some information from temporary.xls to test.xls with VLOOKUP.
When clicking on the command button in access, the following process is initiated:
1, the query is run, results are automatically exported to temporary.xls file, the embedded macro is run, and the workbook is autosaved. Workbook remains open.
2, as a second step, test.xls is opened up, the formatting macro starts to run - first half of it is perfectly done, but when adding the Vlookup, it stops with Runtime error 9 - Subscript out of range error message.
It is strange to me, because I double....no, triplechecked everything that I'm referring to the correct path, correct filename and sheet name - everything is OK, Excel still does not recognize that temporary.xls is an existing and open file.
What is more strange to me that I tried to "hijack" the process somehow, thought I can solve my problem with simply copying the relevant sheet from temporary.xls to test.xls with a macro, and I can rewrite the vlookup section to search the data internally in the same file, no cross-reference to other workbooks.
Bazinga, the same error: Subscript out of range! Cannot even copy the existing file / sheet!
Any idea, what's going on ? Tried enabling Analysis ToolPak, and Analysis ToolPak - VBA in Excel, did not solve my problem.
how could I correct it ? I'll try to post the codes later, currently I'm on a different machine, but I'm interested, what can be the problem in general
I have run into the following problem with my database. I have 2 excel files:
temporary.xls - this is an import of an access query, generated from access 2010, and adding / running some formatting amcro on it.
test.xls - this file already exists in a network folder, I'm opening it up from access database, and run some formatting macro on it.
My aim would be copying some information from temporary.xls to test.xls with VLOOKUP.
When clicking on the command button in access, the following process is initiated:
1, the query is run, results are automatically exported to temporary.xls file, the embedded macro is run, and the workbook is autosaved. Workbook remains open.
2, as a second step, test.xls is opened up, the formatting macro starts to run - first half of it is perfectly done, but when adding the Vlookup, it stops with Runtime error 9 - Subscript out of range error message.
It is strange to me, because I double....no, triplechecked everything that I'm referring to the correct path, correct filename and sheet name - everything is OK, Excel still does not recognize that temporary.xls is an existing and open file.
What is more strange to me that I tried to "hijack" the process somehow, thought I can solve my problem with simply copying the relevant sheet from temporary.xls to test.xls with a macro, and I can rewrite the vlookup section to search the data internally in the same file, no cross-reference to other workbooks.
Bazinga, the same error: Subscript out of range! Cannot even copy the existing file / sheet!
Any idea, what's going on ? Tried enabling Analysis ToolPak, and Analysis ToolPak - VBA in Excel, did not solve my problem.
how could I correct it ? I'll try to post the codes later, currently I'm on a different machine, but I'm interested, what can be the problem in general