ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to: Pass Command Line Parameter ??? (https://www.excelbanter.com/excel-worksheet-functions/51972-how-pass-command-line-parameter.html)

Webtest

How to: Pass Command Line Parameter ???
 
Esteemed Forum Participants and Lurkers:
===============================
Excel 2003 VBA

I vaguely recall having done this somewhere in the way distant past ... can
I pass a general purpose variable (department name string in this case) as a
Command Line Parameter to Excel? Right now I have 6 different workbooks for
6 departments with macros, and I want to consolidate them all into one
workbook with 6 shortcuts, where the shortcut provides the department via a
Command Line Parameter. Except for the department name and folder path, the
Macro is identical for each department. I know I can specify a startup file
in the Command Line, but can I use a general purpose parameter? Isn't there
some way to fetch the parameter in the Workbook Open event?

Is there perhaps an API call that can fetch the command line so that I can
extract my parameter?


All times are GMT +1. The time now is 06:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com