使用HTML作为VBA Excel的界面 [英] Using HTML as a interface for VBA Excel

查看:532
本文介绍了使用HTML作为VBA Excel的界面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻求开发基于Excel的VBA系统,而不是以用户形式显示和输入数据,是否可以将HTML用作界面?如果是这样,您能指出我的设置方向吗?

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?

我已经搜索过Google,并且只能找到有关在VBA中创建HTML电子邮件的信息,如果不是一个直接的编程问题,请您道歉.但是请您帮我.

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.

我只想知道如何做,就是使用VBA设置系统,并以HTML作为界面,并使用Excel来存储数据.

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.

感谢您的阅读.

推荐答案

使用Microsoft Web Browser ActiveX控件.您可以将此控件放在用户窗体上,也可以将其直接放在工作表上.然后,您的VBA代码将使用您生成的任何HTML填充Web浏览器(基本上是框架中的Internet Explorer). (以我的经验,在将其推送到Web浏览器控件之前,您可能必须生成HTML并将其另存为临时文件-但对此我的记忆可能很模糊.)

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.)

这篇关于使用HTML作为VBA Excel的界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆