Contents - Index

Use AntView in Microsoft Excel


You can use the AntView control via VBA in Microsoft Excel.


The steps to do so are as follows (note that the initial register step is not required if you installed AntView via the installer).


- register the AntView.ocx file via regsvr32 from an elevated command prompt.



- Create a new excel sheet

- Go to Developer Mode via the Ribbon (Developer mode can be enabled via File -> Options -> Customize Ribbon -> Add a checkbox in "Developer" on the right treeview) -- or use Alt+F11 to go there.

- Insert a UserForm via the menu -> Insert -> UserForm

- This should popup the ToolBox dialog (if not, it is under menu View) and you can right click on that. Select "Additional Controls..."

- This will show a long list with "Available Controls". Near the top there's an item "AntView MS Edge WebView2 Browser Control". Tick the checkbox in front.

- You can now use the AntView control in your VBA programs


Make sure to check out the Excel demo in the Antview folder under your "Documents" folder.

It should show some of the things you can do.


Depending on the version of Excel that you are using, there's a chance that you get the following error that the control cannot be instantiated.

"Edge initialisation error" "Unable to initialize the Edge loader. Make sure that the file 'WebView2Loader.dll' can be located by your application."


This means that the WebView2Loader.dll file is missing in the Excel folder. First locate where your Excel binary is located (Hint: In task manager, locate Excel -> right click -> Open File Location)

Check if the WebView2Loader.dll file is in that folder, if not, then copy it from the AntView installation folder (C:\Program Files (x86)\AntView ), you can find it in the Win32 folder for a 32 bits version of Excel and in the Win64 folder for a 64 bits version of Excel.