Minggu, 06 Mei 2012

[ExcelVBA] Re: Need to automatically invoke an EXCEL MACRO

 

You won't be able to use a batch file to do everything you're asking. What you have to do is split the tasks between a batch file and the Macro code. Code the batch file to open Excel along with the workbook of interest; then code the Workbook_Open() event to run the Macro that you're wanting to run. That's how I did it with the Service Report program I wrote for my employer (Excel/VBA coding). Works great.


--- In ExcelVBA@yahoogroups.com, "danielrose02" <dan.rose@...> wrote:
>
> I would like to create a BAT file (or Windows Script?) that would:
>
> 1. Start EXCEL
> 2. Open a spreadsheet that contains that MACRO
> 3. Run a particular MACRO
> 4. Close my original spreadsheet (in set 2)
> 5. Display the spreadsheet referenced in the MACRO.
>
> Can anybody provide an example of a BAT file (or Windows Script?) that could do this?
>

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar