![]() |
How to run EXE program from button?
Good day everybody,
I am using Excel 2002 and would like to create a worksheet report with a button. When user click the button, it will run a EXE file that will process and update the database. The button will also refresh the database query in the Excel worksheet. Can anyone guide me how to write the code for the button? Thanks in advance and have a nice day. Best regards, Julie |
How to run EXE program from button?
You assign a macro to the button, in the macro use the SHELL command to call
the external EXE and to refresh you database query using the REFRESH method of the QueryTables command. something like sub Update dim retApp as Double retApp = Shell("C:\path\application.exe") QueryTable.Refresh BackgroundQuery:=False end sub -- Cheers Nigel "Julie" wrote in message ... Good day everybody, I am using Excel 2002 and would like to create a worksheet report with a button. When user click the button, it will run a EXE file that will process and update the database. The button will also refresh the database query in the Excel worksheet. Can anyone guide me how to write the code for the button? Thanks in advance and have a nice day. Best regards, Julie |
All times are GMT +1. The time now is 05:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com