Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old January 26th 20, 05:26 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Aug 2015
Posts: 192
Default Run Excel macro from Win 10 Run box?

I can open an Excel workbook from the Run box with
C:\Users\terry\Walks\WalkIndex.xlsm

But how do I add parameters so that it will then run a specific macro
please?

Terry, East Grinstead, UK


  #2   Report Post  
Old January 26th 20, 08:00 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 1,152
Default Run Excel macro from Win 10 Run box?

I can open an Excel workbook from the Run box with
C:\Users\terry\Walks\WalkIndex.xlsm

But how do I add parameters so that it will then run a specific macro
please?

Terry, East Grinstead, UK


Use that workbook's Workbook_Open event to Call the macro, OR use an Auto_Open
Sub (better) in a standard module to setup what should happen when the file
opens.

Note that Auto_Open() is the *replacement* for the Workbook_Open event, and
should be companioned with an Auto_Close() Sub which is the *replacement* for
the Workbook_BeforeClose event.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #3   Report Post  
Old January 27th 20, 03:16 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 1,152
Default Run Excel macro from Win 10 Run box?

If you have several macros and wish to specify which to run, you could have a
popup list to choose from.

OR

If you want individual executables from say a desktop folder, instead of using
Excel macros just run a vbScript file (e.g.: Macro1.vbs) to do same as your
macro would do.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


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
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 10:31 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 09:22 PM
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve[_84_] Excel Programming 3 July 6th 06 07:42 PM
translate lotus 1-2-3 macro into excel macro using excel 2000 krutledge0209 Excel Programming 1 November 2nd 04 06:50 PM


All times are GMT +1. The time now is 12:36 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017