In my immediate window I type:Please Login or Register to view this content.
Then I press Enter in the immediate window.Please Login or Register to view this content.
Why do I get this error message "Could not find installable ISAM"??
In my immediate window I type:Please Login or Register to view this content.
Then I press Enter in the immediate window.Please Login or Register to view this content.
Why do I get this error message "Could not find installable ISAM"??
Is this helpful?
http://social.msdn.microsoft.com/For...stallable-isam
If this doesn't help, then Google: could not Find Installable ISAM
When I did, I got many many many hits.
Last edited by alansidman; 07-17-2013 at 10:10 AM.
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
I also get an error on this line:
The error is:Please Login or Register to view this content.
Run-time error '3709'
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
Alan, I declared a new String variable, strConnectionString, in Access VBA and wrote this:
I changed the OLEDB to 14.0 instead of 12.0. I read that from the website you just posted. Not sure if that's right though. Because I get the run-time error '3709' still from my post #3.Please Login or Register to view this content.
This is not my area of expertise, but again, I went to google and found the following for the runtime error 3709
http://social.msdn.microsoft.com/For...in-any-record-
Hope you have luck with resolution
Thanks Alan. Hopefully someone else replies!
I get the same error on this line:
The error is:Please Login or Register to view this content.
Run-time error '3709'
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
you ought to be using ACE.OLEDB.12.0 (there is no version 14) and the Else part of your code ought to use the same provider and connection information except the extended properties should read ""Excel 12.0 Macro;HDR=YES"";
Josie
if at first you don't succeed try doing it the way your wife told you to
This is the Else part of my code...
Please Login or Register to view this content.
otherwise strdb is treated as a literal string rather than a variablePlease Login or Register to view this content.
I changed that line and I still get an error on this line:
Error 3709Please Login or Register to view this content.
What exact code are you now using and what's the error message?
If posting code please use code tags, see here.
Please Login or Register to view this content.
My error message is on this line
Run-time error '3709'Please Login or Register to view this content.
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
Are you sure the correct connection is being used?
That's determined by the name of the file you are pasing to the sub.
So you're saying I need to have my connection be the .accdb or .mdb file instead of this line
so it should be like this?Please Login or Register to view this content.
Please Login or Register to view this content.
No I'm saying that strFilename, the argument passed to the sub, is determining which connection string is being used.
What is it you are trying to do?
Do you need the code that determines which connection to use?
Are you using this code for both databases and Excel files?
I'm trying to read an Excel file from Access without opening the Excel file. I need to make a connection between the Access database and the Excel workbook. I would like to use this for Access in VBA, if it can also work the other way around that would be excellent.
Why not just create a link to the Excel file in the database?
I could do that, but I wanted to use VBA so that when my data changes so does my Excel file. The Access link to Excel means that I can't change anything in the Excel file from Access directly.
Using VBA won't mean the data in Excel is updated when you make a change in Excel, unless you actually executed code to update.
it's not real clear which file you are actually trying to open but perhaps
Please Login or Register to view this content.
When I run it again with my file "ExcelFromAccess.xlsm" the error is: "Cannot update. Database or object is read-only"
For these lines:
The error is on the .Open statementPlease Login or Register to view this content.
If you are passing the path and filename you will get that error probably because you are setting the data source to this.
Which comes out as this when I pass 'C:\Test\adotest.xlsm' to the sub.Please Login or Register to view this content.
C:\Users\Norie\Documents\C:\test\adotest.xlsm
If you want to pass the path and filename change the connection string to this.
Please Login or Register to view this content.
I get this error message now
Run-time error '3265'
Item cannot be found in the collection corresponding to the requested name or ordinal.
Here is the line it breaks on:
I changed this line:Please Login or Register to view this content.
And changed this line:Please Login or Register to view this content.
Please Login or Register to view this content.
Well looks like you are getting connected at least.
Now to sort out the problem with the query.
Does your Excel file have a field called 'Excel Version' on 'Sheet1'?
Can you upload the file?
I can't upload the file because it's work related. But I can tell you that my Excel field name is called "Volume" on Sheet1. The actual name of Sheet1 is "Errors_Universal"
So why do you have this SQL which is looking for a sheet called 'Sheet1',
and this which is looking for a field called 'Excel Version'?Please Login or Register to view this content.
PS We never need, or want, to see the actual file. Something with dummy data is fine as long as it reflects the original in layout etc.Please Login or Register to view this content.
I changed the code to reflect my Excel worksheet. I would usually make a dummy sheet, but I'm in the middle of working on a project related to this. I can make a dummy sheet for you, but I think you already made one. The "Volume" column is all integers.Please Login or Register to view this content.
If Volume is all integers why are you searching for a string, 'Excel 2007'.
I did make a dummy file, where Sheet1 had 2 fields - Field1 and Excel Version.
So the line rst(1).value refers to the first column of my Excel worksheet which is "AreaID". So AreaID has now changed to "ME" in the first row where it finds Volume = 13Please Login or Register to view this content.
It works!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks