Solved

Calling Excel Macro using batch script/VBScript

Posted on 2004-10-04
3
1,326 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

777 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