By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,336 Members | 1,086 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,336 IT Pros & Developers. It's quick & easy.

3709 Runtime Error

P: 14
I tried the code with automation:

For Each sheet In objWorkBook.sheets 'for each sheet in excel loop
Debug.Print "Imported sheet is :"; sheet.Name
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, sheet.Name, "OperatorData", True, sheet.Name & "!"

the OPERATORDATA excel file has 10 work sheets.
after importing 6 sheets, this run time error is displayed indicating DOCMD.TransferSpreadSheet line

I tried to import through GetExternalData/Import from Access File Menu.

this displays an error message without help button on the message box and the message reads like.... SUBSCRIPT OUT OF RANGE.

Can any one help me please.

With regards
Dec 21 '09 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 1,287
If you are importing columns into specific fields, you should double check to make sure that they match.
Dec 23 '09 #2

P: 14
I believe, tables will automatically be created in Access Database when you are importing any sheet from Excel based on the parameters given in the TRANSFERSPREADSHEET function.

So it is not the case with the table structure.

I even tried with Import External Data from File Menu in Ms.Access and the error is SUBSCRIPT OUT OF RANGE

Why does this happen...?

Any prompt answer will be appreciated.
Jan 5 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.