Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Command line parameters to Excel
Hi,
I would be opening an excel spreadsheet from a powerbuilder application. Something like this: excel myexcelsheet.xls thisistheparam where "thisistheparam" is my parameter. How would I access the string "thisistheparam" in workbook_open event? Thanks, Tom |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Command line parameters to Excel
I am also interested in finding the answer to this problem
-- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Command line parameters to Excel
I would LOVE to know how to do this too! Has anyone found a way? ;
-- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Command line parameters to Excel
I've just briefly tested a horrible kludge using a batch file and an
environment variable. This is tested on Windows XP only, with the call made from a desktop shortcut, or from shell within VB5. I created a 2-line batch file, callXL.bat set xl_command_line=%2 %3 %4 %5 %6 %7 %8 %9 %1 I then call the batch file with the workbook path as the first parameter, followed by any other parameters (in a shortcut) C:\callXL.bat "C:\SJGtest.xls" hello world (or from VB) Shell "C:\callXL.bat ""C:\SJGtest.xls"" hello world" and, in the workbook, it is retrieved using: Private Sub Test() MsgBox Environ("xl_command_line") End Sub riveaira < wrote: I would LOVE to know how to do this too! Has anyone found a way? ;) --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Are there command line parameters for Excel? | Excel Discussion (Misc queries) | |||
What are the possible command-line arguments in Excel? | Excel Discussion (Misc queries) | |||
command line Excel Script | Excel Discussion (Misc queries) | |||
command line excel to run macros | Excel Programming | |||
Command line parameters into a macro | Excel Programming |