Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Sun, 27 Dec 2009 23:15:22 -0500, Vincent Fatica <abuse@localhost wrote:
Following your example and the instructions in http://support.microsoft.com/kb/213639 I put the following code into "ThisWorkbook". Private Sub Workbook_BeforeClose(Cancel As Boolean) With Sheets("Sheet1") arg1 = .Range("D5") arg2 = .Range("E5") End With Shell ("d:\uty\setslope.exe " & arg1 & " " & arg2) End Sub When I close the file, nothing happens. Mt EXE doesn't run (I'd hear a beep if it did) and there are no error messages. I'm in completely new territory here. Please help further. Thanks. OK. Thanks. I got it working. I had to (1) allow macros (what a pain!) and (2) change "Sheet1" (above) to the actual given name ("2009-0") of the worksheet. In the VB environment, I see, in the project pane, "Sheet1 (2009-0)". It is not actually Sheet1. Is this expected? If I have given names to sheets, I must use those names ... right? Thanks again. -- - Vince |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a way to unload the loaded XLL file in Excel? Hi all, I amdebugging XLL link library using Visual C++. Everytime I rebuild the XLL, Ihave to close the whole Excel program and relaunch the Excel program again,and then load in the newly gene | Excel Discussion (Misc queries) | |||
Program shutsdown when I close workbook | Excel Discussion (Misc queries) | |||
Double-click X to close program | Excel Discussion (Misc queries) | |||
Close program | Excel Programming |