Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 516
Default Macro/Function for Keyboard button combinations

I have a DDE link that pulls in certain information to my spreadsheet.
Occassionally the link goes down, but unless the user is really paying
attention they may not know the data is stale. When the user depresses
Ctrl+Shift+R, it refreshes the link (whether it is current or not), but I am
tired of people asking what the combination is (because they forget). I'd
like to:
a.) create a button that operates the keyboard stroke Ctrl+Shift+R
or (better)
b.) create a funtion that automatically launches the keyboard stroke at
timed intervals.

If possible as well, is there a way to set up a notification if the link is
down? (like a cell that contains the value "Live" when it is communicating
and "Dead" when it isn't)
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

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
Use a keyboard button to run a macro johncassell[_23_] Excel Programming 2 August 12th 05 02:21 PM
Keyboard Shortcuts combinations of function keys, c... FJM Excel Worksheet Functions 1 January 17th 05 11:35 PM
writting a macro for the sum function so I can use it as a keyboard shortcut Dominic Coombe Excel Programming 0 July 22nd 04 06:59 PM
writting a macro for the sum function so I can use it as a keyboard shortcut JulieD Excel Programming 0 July 22nd 04 03:47 PM
writting a macro for the sum function so I can use it as a keyboard shortcut Frank Kabel Excel Programming 0 July 22nd 04 03:47 PM


All times are GMT +1. The time now is 08:13 PM.

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

About Us

"It's about Microsoft Excel"