how to add selenium reference dynamically in VBA

svv 26 Reputation points
2022-02-15T04:51:47.923+00:00

I am using selenium in my VBA project for browser invoke from the application. its happening properly. So this we need to add reference in tools for selenium right. that manual process i want to make it programmatically in VBA. Can please please suggest me how to do this?

Developer technologies Visual Basic for Applications
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 122.5K Reputation points
    2022-02-15T19:07:38.503+00:00

    For example, if there is a code like this:

    Dim x as ClassX
    Set x = New ClassX
    

    sometimes it can be replaced with:

    Dim x as Object
    Set x = CreateObject("ClassX")
    

    The latter does not need a reference to the library that contains ClassX, and the rest of the code will run even if the library is not present.

    Maybe you can use this approach in your case.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.