tksy
tksy

Reputation: 3529

Is it possible to run a VBA form as a .exe file

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

Upvotes: 4

Views: 41307

Answers (5)

Marek
Marek

Reputation: 1

click Build -> Build solution in VisualStudio Then the program will make executable file somewhere in your project folder

Upvotes: 0

Ross
Ross

Reputation: 300

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???/..

as I think this does. 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.

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

thanks Ross

Upvotes: 0

Patrick Cuff
Patrick Cuff

Reputation: 29786

No, not natively.

There are some ways to emulate an 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.
  • 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.
  • Word: You can pass the /m switch to Word on startup with the name of a macro to run.

Upvotes: 5

Fredou
Fredou

Reputation: 20100

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.

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

Upvotes: 2

Wolf5
Wolf5

Reputation: 17130

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.

Upvotes: 0

Related Questions