Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A stand-alone autorun xlm file, when clicked, will automatically
run the macro. Is there a vba equivalent of such thing? All the script files (.bas) I created, when clicked, ask me to choose a program to open them. And when I choose Excel, Excel simply opens the files but does not run the macro. What do I need to do to be able to double-click a vba file and run the macro, without running Excel first? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
vbscript ?
or create an excel file containing the macro and link it to the workbook_open event -- Tim Williams Palo Alto, CA "John Smith" wrote in message ... A stand-alone autorun xlm file, when clicked, will automatically run the macro. Is there a vba equivalent of such thing? All the script files (.bas) I created, when clicked, ask me to choose a program to open them. And when I choose Excel, Excel simply opens the files but does not run the macro. What do I need to do to be able to double-click a vba file and run the macro, without running Excel first? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
John,
Basically, you can't. VBA need a container to run in, Excel in this case. VBA is designed to interact with its host and if that host does not exist, it cannot function. Depending on what you are trying to do (that does not involve Excel), VBScript may be suitable. These can be run "standalone". NickHK "John Smith" wrote in message ... A stand-alone autorun xlm file, when clicked, will automatically run the macro. Is there a vba equivalent of such thing? All the script files (.bas) I created, when clicked, ask me to choose a program to open them. And when I choose Excel, Excel simply opens the files but does not run the macro. What do I need to do to be able to double-click a vba file and run the macro, without running Excel first? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could create a normal workbook (.xls file) and put the code into a General
module. Name the procedure Auto_Open. John Smith wrote: A stand-alone autorun xlm file, when clicked, will automatically run the macro. Is there a vba equivalent of such thing? All the script files (.bas) I created, when clicked, ask me to choose a program to open them. And when I choose Excel, Excel simply opens the files but does not run the macro. What do I need to do to be able to double-click a vba file and run the macro, without running Excel first? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autorun.inf | Excel Programming | |||
How do you make a backup file - .bak or MS equivalent? | New Users to Excel | |||
Autorun Macro on file opening | Excel Programming | |||
Autorun Macro on file opening | Excel Programming | |||
Autorun Add-In | Excel Programming |