Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Command line used for opening .xls files and clicking abutton/running a function.

Ok, I finally found something I can work with:

Option Explicit

On Error Resume Next

ExcelMacroExample

Sub ExcelMacroExample()

Dim xlApp
Dim xlBook

Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open("C:\MyWorkbook.xls", 0, True)
xlApp.Run "MyMacro"
xlApp.Quit

Set xlBook = Nothing
Set xlApp = Nothing

End Sub

..vbs script which can be used.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2002: Opening related files by clicking file address Mr. Low Excel Discussion (Misc queries) 2 July 31st 09 06:47 PM
Opening files by double clicking takes for ever - Word, Excel Scott Townsend Setting up and Configuration of Excel 3 July 31st 08 01:17 PM
Running Macros from Command line DrukeEr Excel Programming 3 July 26th 05 06:03 PM
Running a macro from a command line Kelly Excel Programming 4 November 30th 04 08:17 PM
Running a macro from the command line Czech Excel Programming 1 October 28th 04 09:51 PM


All times are GMT +1. The time now is 06:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"