System Error &H80004005

ertweety

Registered User.
Local time
Today, 10:42
Joined
Dec 1, 2011
Messages
17
I have some vba code that was working fine yesterday. When I try to run it today, I am getting the following error "System Error &H80004005 (-2147467259). I've tried searching everywhere on how to fix it but nothing seems to work. The code I am running is below.

Option Compare Database
Function append_data5()
DoCmd.TransferSpreadsheet acImport, 8, "master_import", "T:\ACCOUNT\MANAGEMENT_REPORTING\FTE\Payroll_Files\master_import.xls", True, "master!A1:Y10000"
End Function

Can somebody please help on how I fix this error. Thanks so much!
 
1. How many records does Master_Import currently have?
2. How many fields does it contain?
3. How many rows of data does the spreadsheet have?
4. How many columns does it contain?
5. Does the spreadsheet contain headers?
6. What happens when you run it without the range? i.e. "master!A1:Y10000"

I suspect no. 6 but let's get some more information from you first.
 
1. Master_Import currently has 4800 rows
2. It contains 5 columns
3. The spreadsheet has 500 rows
4. It contains 5 columns.
5. No headers
6. Doesn't work without range.

It worked yesterday and nothing has changed. Same data. None of my modules are working and I get the same data for all of them so somehow I think it must have something to do with an add in or something. Not sure.
 
Ok, do you see the trailing space after Payroll_Files?
 
good point. I fixed that but still the same error. I'm going to try to re-create the database and keep my fingers crossed.
 
Copy the records in the range, paste into a new xls doc, save and try importing from that (without the range).
 
the data specifier

"master!A1:Y10000"

I am not sure without trying, but i vaguely recollect you need a LEADING ! to specify the active tab. I would be inclined to check that.
 
the data specifier

"master!A1:Y10000"

I am not sure without trying, but i vaguely recollect you need a LEADING ! to specify the active tab. I would be inclined to check that.
I can never remember which one it's needed for, whether it's import or export. I know that one of them doesn't require it.
 

Users who are viewing this thread

Back
Top Bottom