View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Hemanth[_2_] Hemanth[_2_] is offline
external usenet poster
 
Posts: 4
Default Creating a .EXE to run excel macros

I think open workbook event with a userform should work fine for my
case. If not .exe, I'm looking for a way to emulate the same.

Thank you all for your suggestions.

- Hemanth



John Coleman wrote:
Hemanth wrote:
Hello,

I want create a self executing .exe file that opens an userform (or
dialogbox) with a Run button along with some other controls and runs a
VBA macro when user clicks on the button.

Can someone suggest me an easiest and quick way to do this? Also, can
it be done without using Visual Studio for VB (I only have access to MS
Excel with VBA support)?

Your help is much appreciated.

TIA,
Hemanth


You can't use VBA to make stand-alone executables. You can use a
workbook open event that automatically shows the userform when the
workbook is open and create an icon linked to the workbook.
Functionally, this will have much of the same effect as what you are
asking for. You can also launch a VBA macro from VBScript (though you
need to create an instance of excel to do so, if a VBScript icon looks
better to you than an excel icon. If you want to get fancy, you can get
the script to run in a .hta file (an html application) and use the
browser to display the form and call the macro. I don't know how to do
this as I haven't yet had the opportunity to learn html applications,
but I know it can be done.

Just some ideas

-John Coleman