If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
DDE Links
In a command button, I have the following code:-
Call PutBvar("SYMBOL", Range("A8")) This passes the value of A8 into a variable in another program. Is there any way I can automate this process, for instance if the value in A8 changes, then pass the value into the variable. I am reluctant to use the worksheet selectionchange or calculate method because there is a lot of variables and there is a risk of excel crashing. Thanks Alec |
#2
|
|||
|
|||
DDE Links
Alec Kolundzic wrote:
In a command button, I have the following code:- Call PutBvar("SYMBOL", Range("A8")) This passes the value of A8 into a variable in another program. Is there any way I can automate this process, for instance if the value in A8 changes, then pass the value into the variable. You could set up a DDE link between the other program and your worksheet perhaps? Or if the other "program" is another workbook open in the same instance of Excel then a straight formula link would do the job - but I assume that is not the case. I am reluctant to use the worksheet selectionchange or calculate method because there is a lot of variables and there is a risk of excel crashing. I have not encountered crashes with these events if they are written correctly. You need to avoid recursion if you might cause the event to occur again from within the event procedu Private Sub Worksheet_Calculate() Application.EnableEvents = False ' do stuff Application.EnableEvents = True End Sub Bill Manville MVP - Microsoft Excel, Oxford, England No email replies please - respond to newsgroup |
#3
|
|||
|
|||
DDE Links
Thanks Bill
-----Original Message----- Alec Kolundzic wrote: In a command button, I have the following code:- Call PutBvar("SYMBOL", Range("A8")) This passes the value of A8 into a variable in another program. Is there any way I can automate this process, for instance if the value in A8 changes, then pass the value into the variable. You could set up a DDE link between the other program and your worksheet perhaps? Or if the other "program" is another workbook open in the same instance of Excel then a straight formula link would do the job - but I assume that is not the case. I am reluctant to use the worksheet selectionchange or calculate method because there is a lot of variables and there is a risk of excel crashing. I have not encountered crashes with these events if they are written correctly. You need to avoid recursion if you might cause the event to occur again from within the event procedu Private Sub Worksheet_Calculate() Application.EnableEvents = False ' do stuff Application.EnableEvents = True End Sub Bill Manville MVP - Microsoft Excel, Oxford, England No email replies please - respond to newsgroup . |
Thread Tools | |
Display Modes | |
|
|