Replies: 3 comments
-
@MarkJohnstoneGitHub reports in another discussion: I'm using MS Access 2016 and WebShared.bas wouldn't compile due to Excel reference ThisWorkbook.Path . Is there a generic VBA method that would be appropriate? Maybe CurDir()? It however defaults to the user/documents instead of the application file location. Other possible solutions see: https://stackoverflow.com/questions/45854327/constant-that-indicates-access-or-excel |
Beta Was this translation helpful? Give feedback.
-
I would use either of the solutions presented as "accepted answer" in the StackOverflow link that you mentioned to keep your first-cut feasibility assessment moving forward. We can come back to this and optimize once you have SeleniumVBA "functional" at some minimal level in MS Access. The nice thing about using the conditional compiling as a general solution is that you will have marked clearly all of the bottlenecks for further assessment later, on your "optimization" pass... Thanks! |
Beta Was this translation helpful? Give feedback.
-
@MarkJohnstoneGitHub, I refactored WebShared class to avoid your MS Access compile errors. The Application object is now only used in SeleniumVBA to return the path of the active code module's document path: Application.VBE.ActiveVBProject.Filename ... which now should compile in Excel, Access, and Word. I tested in MS Access by importing all modules into an .accdb and verified that it compiles and then ran a few test modules. I did not run all of the test modules - will leave that exercise to you or anyone else that wishes to use SeleniumVBA in MS Access. I also referenced the .accdb I made above from a different .accdb and was able to successfully call SeleniumVBA functions from the former. My knowledge of programming in MS Access is outdated by literally decades, so I'm sure there might be a better way to create and reference an Add-in in Access. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Placeholder for highlighting/solving issues encountered in trying to use SeleniumVBA in MS Access....
Beta Was this translation helpful? Give feedback.
All reactions