Solved

Calling Excel Macro using batch script/VBScript

Posted on 2004-10-04
3
1,328 Views
Last Modified: 2008-02-01
Hi,

How can I call an excel macro using batch or vbscript?

thanks,
shellyp
0
Comment
Question by:shellyp
3 Comments
 
LVL 6

Accepted Solution

by:
Danny Kon earned 500 total points
ID: 12303610
I don't think you can but I think you can do what you want if you start excel and you let excel execute a macro when it starts

find the excel.exe put the path and the exe in a batch and create the macro in excel as follows:

Press Alt+F11 to go to Visual Basic Editor
In the "Project" window, double-click on "ThisWorkbook"
Enter the macro code in the workbook
   Private Sub Workbook_Open()

and put here your code

Good-Luck

Dan
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question