A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Links and Linking
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

DDE Links



 
 
Thread Tools Display Modes
  #1  
Old May 14th, 2004, 09:37 AM
Alec Kolundzic
external usenet poster
 
Posts: n/a
Default 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  
Old May 14th, 2004, 01:24 PM
Bill Manville
external usenet poster
 
Posts: n/a
Default 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  
Old May 14th, 2004, 02:13 PM
Alec Kolundzic
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.