View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_407_] Leith Ross[_407_] is offline
external usenet poster
 
Posts: 1
Default Macro/Function for Keyboard button combinations


Hello Matt,

You can refresh the data automatically after a certain time has
elapsed. The DDE doesn't support a method of determining if it is
"Live" or "Dead". Add a new VBA module to your project and copy the
macros into it. The Refresh will happen every 15 seconds. You can
change this to whatever you need. The format is Hours:Minutes:Seconds.
In your code call "RefreshData" to start the automatic refresh.


Code:
--------------------

Sub RefreshData()

Application.OnTime Now() + TimeValue("00:00:15"), "DDERefresh"

End Sub

Sub DDERefresh

Application.SendKeys( "^+R")

End Sub

--------------------


Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=495560