是否可以将VBA表单作为.exe文件运行

时间:2022-08-04 16:03:31

Is it possible to save a form in VBA as .exe file and then run it.

是否可以将表单在VBA中保存为.exe文件,然后运行它。

4 个解决方案

#1


4  

No, not natively.

不,不是本地的。

There are some ways to emulate an EXE:

有一些方法可以模拟EXE:

  • Excel: 3rd party tool that claims to be able to compile an workbook to an EXE: DoneEx XCell Compiler. You can also create an automatic marco, Auto_Open, to run when the workbook is opened.
  • Excel:声称能够将工作簿编译为EXE的第三方工具:DoneEx XCell编译器。您还可以创建一个自动marco,Auto_Open,以便在打开工作簿时运行。

  • Access: Microsoft used to have a way of delivering an Access database as an executable (the name of the tool escapes me) so you could deploy your database to desktops that didn't have Access installed, but I don't think they offer this anymore. You could convert you MDB to an MDE and set the startup properties to hide the database window and menus and such to emulate an EXE, but your users will need to have Access installed.
  • 访问:Microsoft曾经有一种方式将Access数据库作为可执行文件(工具的名称让我逃脱),因此您可以将数据库部署到没有安装Access的桌面,但我认为他们不提供这个了。您可以将MDB转换为MDE并设置启动属性以隐藏数据库窗口和菜单等模拟EXE,但您的用户需要安装Access。

  • Word: You can pass the /m switch to Word on startup with the name of a macro to run.
  • 单词:您可以在启动时将/ m开关传递给Word,并运行要运行的宏的名称。

#2


2  

I think there is at least 2 way

我认为至少有两种方式

move the code into visual basic 6 and compile it or use visual studio tool for office and see what you can do.

将代码移动到visual basic 6并编译它或使用visual studio工具办公,看看你能做些什么。

if these 2 solutions is a no no for you, then you are out of luck

如果这2个解决方案对你来说不对,那么你就不走运了

#3


0  

No. VBA is an addon to applications to support "scripting" in the form of VB. So unless your application supports a way to save the internal script as en external EXE, you are out of luck.

不,VBA是支持VB形式的“脚本”的应用程序的插件。因此,除非您的应用程序支持将内部脚本保存为外部EXE的方法,否则您运气不佳。

#4


0  

I think DoneEx still needs Excel installed, it just bootstraps something to the xls file, or bootstraps that to something and wraps it up as an exe???/..

我认为DoneEx仍然需要安装Excel,它只是引导某些东西到xls文件,或者引导到某些东西并将它包装成exe ??? / ..

as I think this does. http://cpap.com.br/orlando/XLtoExeMore.asp

我认为这样做。 http://cpap.com.br/orlando/XLtoExeMore.asp

But at least the second one if free!

但至少第二个如果有空!

I have not tested on PC's with out office.

我还没有在PC办公室进行测试。

what is it you are trying to accomplish there may be a work around another way?

你想要完成的是什么,可能有另一种方式的工作?

thanks Ross

#1


4  

No, not natively.

不,不是本地的。

There are some ways to emulate an EXE:

有一些方法可以模拟EXE:

  • Excel: 3rd party tool that claims to be able to compile an workbook to an EXE: DoneEx XCell Compiler. You can also create an automatic marco, Auto_Open, to run when the workbook is opened.
  • Excel:声称能够将工作簿编译为EXE的第三方工具:DoneEx XCell编译器。您还可以创建一个自动marco,Auto_Open,以便在打开工作簿时运行。

  • Access: Microsoft used to have a way of delivering an Access database as an executable (the name of the tool escapes me) so you could deploy your database to desktops that didn't have Access installed, but I don't think they offer this anymore. You could convert you MDB to an MDE and set the startup properties to hide the database window and menus and such to emulate an EXE, but your users will need to have Access installed.
  • 访问:Microsoft曾经有一种方式将Access数据库作为可执行文件(工具的名称让我逃脱),因此您可以将数据库部署到没有安装Access的桌面,但我认为他们不提供这个了。您可以将MDB转换为MDE并设置启动属性以隐藏数据库窗口和菜单等模拟EXE,但您的用户需要安装Access。

  • Word: You can pass the /m switch to Word on startup with the name of a macro to run.
  • 单词:您可以在启动时将/ m开关传递给Word,并运行要运行的宏的名称。

#2


2  

I think there is at least 2 way

我认为至少有两种方式

move the code into visual basic 6 and compile it or use visual studio tool for office and see what you can do.

将代码移动到visual basic 6并编译它或使用visual studio工具办公,看看你能做些什么。

if these 2 solutions is a no no for you, then you are out of luck

如果这2个解决方案对你来说不对,那么你就不走运了

#3


0  

No. VBA is an addon to applications to support "scripting" in the form of VB. So unless your application supports a way to save the internal script as en external EXE, you are out of luck.

不,VBA是支持VB形式的“脚本”的应用程序的插件。因此,除非您的应用程序支持将内部脚本保存为外部EXE的方法,否则您运气不佳。

#4


0  

I think DoneEx still needs Excel installed, it just bootstraps something to the xls file, or bootstraps that to something and wraps it up as an exe???/..

我认为DoneEx仍然需要安装Excel,它只是引导某些东西到xls文件,或者引导到某些东西并将它包装成exe ??? / ..

as I think this does. http://cpap.com.br/orlando/XLtoExeMore.asp

我认为这样做。 http://cpap.com.br/orlando/XLtoExeMore.asp

But at least the second one if free!

但至少第二个如果有空!

I have not tested on PC's with out office.

我还没有在PC办公室进行测试。

what is it you are trying to accomplish there may be a work around another way?

你想要完成的是什么,可能有另一种方式的工作?

thanks Ross