Solved

Calling Excel Macro using batch script/VBScript

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now