Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Method ListIndex failed error?

Status
Not open for further replies.

Aidy680

Technical User
Nov 1, 2006
138
GB
Hi why is it that the following code (contained within an Excel spreadsheet) works on most machines but not on one:

.PivotTableWizard SourceType:=xlExternal, SourceData:=Array( _
"SELECT IR_Enriched_Reduced.* ", _
"FROM `" & strDBName & "`.IR_Enriched_Reduced IR_Enriched_Reduced"), _
TableDestination:=Cells(19, 4), TableName:="ptIR", BackgroundQuery:=False, Connection:=Array( _
"ODBC;Driver={Microsoft Access Driver (*.mdb)};DBQ=" & strDBName & ".mdb;DefaultDir=" & gcstrDataDirectory, _
"DriverId=281;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;ReadOnly=1")

On this line I get the dreaded -2147417848 error message:

Method Listindex of object IMdcCombo failed.

From looking at other posts it seems that this is quite general.

My hunch is that it's something to do with References.

Any ideas?

Pls see link:

thread68-1306850
 
As a guess I wonder if all workstations have the same version of Access installed? Doesn't seem like it would be it... Maybe different versions of Jet are installed or different MDAC's?

I agree with the poster in the Office forum... You would probably do better in the Office VBA forum forum707
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top