Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
run exe program and locate current workbook
I have 2 questions:
1. how can I determine the current working folder of a XLS file with a macro? GetAbsolutePath didn't give me the best results... 2. is it possible to run .exe program from a VBA macro and how? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
run exe program and locate current workbook
Use ThisWorkbook.Path to get the full path name of the workbook.
Use CurDir to get the current default path. You can run an exe file by using the Shell command. See help for more details. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Domagoj Vulin" wrote in message ... I have 2 questions: 1. how can I determine the current working folder of a XLS file with a macro? GetAbsolutePath didn't give me the best results... 2. is it possible to run .exe program from a VBA macro and how? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
run exe program and locate current workbook
"Domagoj Vulin" wrote in message ... I have 2 questions: 1. how can I determine the current working folder of a XLS file with a macro? GetAbsolutePath didn't give me the best results... What do youmean by this ? 2. is it possible to run .exe program from a VBA macro and how? Yes , you can use the shell function Progid = Shell(pathname[,windowstyle]) Progid is a variable of type double and the returns the process ID if it works or 0 otherwise pathname - Required String holding the name of the program to execute and any required arguments or command-line switches; may include directory or folder and drive. windowstyle - Optional integer defining style of window in which program is run , use one of the intrinsic constants vbHide0 vbNormalFocus vbMinimizedFocus vbMaximizedFocus vbNormalNoFocus vbMinimizedNoFocus6 Note the program executes asynchronously, that is VBA does NOT wait for it to complete before carrying on. Keith |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Quickly locate a specific page/tab in workbook | Excel Discussion (Misc queries) | |||
Locate Workbook | Excel Discussion (Misc queries) | |||
Addon program for excell to locate muliple entries in a list | Charts and Charting in Excel | |||
How do you locate External References in an Excel Workbook | Excel Discussion (Misc queries) | |||
How do I program a cell to automaticinput the current date as dat. | Excel Worksheet Functions |