Using HTML as a interface for VBA Excel [closed]

2019-09-22 10:16发布

问题:

I am looking to develop an Excel based VBA system, as opposed to displaying and entering data in user forms, is it possible to use HTML as an interface to do so? And if so, can you please point me in the direction of how to set this up?

I have searched Google and can only find information on creating HTML emails in VBA, so apologies if this isn't an outright programming question/issue, but please can you help me.

All I want to know how to do is set up a system using VBA with HTML as the interface and Excel to store the data.

Thank you for reading.

回答1:

Use the Microsoft Web Browser ActiveX control. You can put this control on a userform or position it directly over your worksheet. Your VBA code will then populate the web browser (basically Internet Explorer in a frame) with whatever HTML you generate. (In my experience, you'll likely have to generate the HTML and save it as a temp file before pushing it to the web browser control - but my memory may be fuzzy on this.)