ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I write a VBA script that runs from the DOS prompt window? (https://www.excelbanter.com/excel-programming/374246-how-do-i-write-vba-script-runs-dos-prompt-window.html)

cmhoward

How do I write a VBA script that runs from the DOS prompt window?
 
I use VBA with EXCEL and want to write and run a VBA script that can be run
from the DOS prompt and uses Windows XP but no EXCEL services.

Tom Ogilvy

How do I write a VBA script that runs from the DOS prompt window?
 
http://www.microsoft.com/scripting

--
Regards,
Tom Ogilvy

"cmhoward" wrote in message
...
I use VBA with EXCEL and want to write and run a VBA script that can be run
from the DOS prompt and uses Windows XP but no EXCEL services.




John Coleman

How do I write a VBA script that runs from the DOS prompt window?
 

cmhoward wrote:
I use VBA with EXCEL and want to write and run a VBA script that can be run
from the DOS prompt and uses Windows XP but no EXCEL services.


Expanding on what Tom said - what you want to do is simply impossible.
VBA needs a host application to run in. *But* - VBScript is a quite
similar language that can run by itself in Windows XP. As a language,
VBScript is better than VBA in some ways (built in regular expression
support and dictionaries (associative arrays)) and worse in others
(variant is the only type - a blemish in my book, plus it doesn't come
with a nice IDE). It is an interpreted language and is thus noticably
slower than the quasi-compiled VBA, but for scripts designed to run
from a DOS prompt this probably isn't an issue. The learning curve in
going from VBA to VBScript is very small. Often, a program that you
have written in Excel VBA (if it doesn't really use Excel) can be
turned into a functioning VBScript program in a matter of minutes.

Hope that helps

-John Coleman



All times are GMT +1. The time now is 03:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com