I have found a few ways to re-link tables via VBA, but is there a way to create a database, and then create an array in VBA of workbooks to open, then once the workbook is opened run the re-link code, close the db and move onto the next database?
I have found a few ways to re-link tables via VBA, but is there a way to create a database, and then create an array in VBA of workbooks to open, then once the workbook is opened run the re-link code, close the db and move onto the next database?
I found quite a few links based on this google search parm
Good luck.opening multiple msaccess databases with vba
Workbooks? Access
Perhaps you should tell us clearly WHAT you are trying to do.
I have about 200 access databases with a linked SQL Table that I need the table link refreshed. So instead of manually doing each and every database I was going to try to VBA it somehow..
I have my code to import the SQL table, and I have my code to cycle the databases, but the snippet I am using is:
But I want to (this is excel terms I know) change focus from the db I am running this code in, to the db I just opened to create the table in. Is this possible?Code:Dim tdf As DAO.TableDef Set tdf = Currentdb.CreateTableDef