Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 150
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default 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



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
program tab button Bhiravi Excel Discussion (Misc queries) 1 December 21st 06 02:39 PM
program tab button Bhiravi Excel Worksheet Functions 1 December 21st 06 02:39 PM
how to program a button... Verner Jensen, Ålborg Excel Programming 3 May 9th 05 03:03 PM
Program button appearance Bob M. Setting up and Configuration of Excel 3 May 7th 05 01:14 AM
running a command button from a program Pete at Sappi Fine Paper[_2_] Excel Programming 7 May 5th 05 03:08 PM


All times are GMT +1. The time now is 12:14 PM.

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

About Us

"It's about Microsoft Excel"