0

So I have a VB.NET Window form application that pulls data from an Access DB and the DB has an Excel file as a linked table.

Currently when I run the app the Excel file path is hardcoded in the Access DB. Is there a way where I can change that path from the VB.net app? please note I already have set up a dialog box to select an Excel file and already save the path of the selected file.

June7
  • 19,874
  • 8
  • 24
  • 34
  • It can certainly be done in Access VBA - common topic. https://stackoverflow.com/questions/15682332/programmatically-change-the-connection-of-a-linked-table-in-ms-access. No idea how to translate into VB.net. Perhaps VB.net could run VBA procedure https://stackoverflow.com/questions/36576523/how-to-run-ms-access-macro-from-vb-net, but again, no idea how to pass parameter. – June7 Apr 27 '21 at 18:31
  • I think pass argument with statement like: `oAccess.Run "SubName", "argument"`. – June7 Apr 27 '21 at 18:38

0 Answers0