I have a form with an Active X Web Browser Control to display html files inside the control.
When I set the Control Source using Properties to an html file, it shows e.g. ="D:\Home\Documents\Myfile.htm" in the Property.
Running the application shows the html file correctly in the Web Browser Control.
However, if I try to set the Control Source using VBA in code it does not work (WebBrowser1.ControlSource = "D:\Home\Documents\Myfile.htm"). It says the location is not valid when running the application.
If I put = in (WebBrowser1.ControlSource = "=D:\Home|Documents\Myfile.htm"), this gives invalid syntax when running the application.
Anyone know what I am doing wrong and how to correctly set the Control Source to an html file (on the computer) using VBA?