Hi,
I've got a database with many linked tables (from Excel workbooks with multiple worksheets). Recently the names of the worksheet tabs in the source data has changed. I want to update the linked table definition to refer to the new names without having to delete/recreate them.
I can't find a way to do this via the UI so I've been trying to do it programatically.
The nearest I've got is:
...but this gives the error:
Run-time error '3268':
Cannot set this property once the object is part of a collection
...I'm guessing that the property is read only and this can't be done but if anyone knows of a way of doing this then you'd be saving me a nasty repetitive manual process and have my gratitude!!
Rob...
I've got a database with many linked tables (from Excel workbooks with multiple worksheets). Recently the names of the worksheet tabs in the source data has changed. I want to update the linked table definition to refer to the new names without having to delete/recreate them.
I can't find a way to do this via the UI so I've been trying to do it programatically.
The nearest I've got is:
Code:
CurrentDb.CreateTableDef(sSheetName).SourceTableName = sNewName
...but this gives the error:
Run-time error '3268':
Cannot set this property once the object is part of a collection
...I'm guessing that the property is read only and this can't be done but if anyone knows of a way of doing this then you'd be saving me a nasty repetitive manual process and have my gratitude!!

Rob...