Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default DDE link update for stock quotes

Hello,

I have a spreadsheet that uses DDE links to retrieve stock quotes. I
have set all of the links to use auto updating. For some unknown
reason, 1 or more DDE link will be reset to manual updating. (I
haven't been able to determine what causes this.)

I have some VBA code to get a list of the DDE links in the workbook,
and determine which one(s) are set to manual. I use the following:

Public Sub TestLinks()
Dim aLinks As Variant
Dim i As Integer

On Error GoTo ErrorHandler

aLinks = ActiveWorkbook.LinkSources(xlOLELinks)
If Not IsEmpty(aLinks) Then
For i = 1 To UBound(aLinks)
If ActiveWorkbook.LinkInfo(aLinks(i), xlUpdateState,
xlLinkInfoOLELinks) = 2 Then
Debug.Print "manual link:" & aLinks(i)
End If
Next i
End If

ExitProcedu
On Error Resume Next

Exit Sub
ErrorHandler:
MsgBox Err.Description, vbCritical + vbOKOnly
Resume ExitProcedure
End Sub

I'm aware that I can go to the Edit-Links menu, and change the link
update there. My question is this: is there a way to
programmatically change a link from manual update to auto update?
(Setting the LinkInfo property to 2 doesn't seem to work.)

Thanks,

Mike
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
Stock Quotes #VALUE for some entires on update Mark Taylor Excel Discussion (Misc queries) 1 March 11th 08 07:12 PM
MSN Stock Quotes Addin fails to update [email protected] Excel Worksheet Functions 1 February 14th 08 01:02 PM
MSN Stock Quotes Singerie Excel Discussion (Misc queries) 0 January 14th 08 01:24 AM
How do i get historical stock quotes using MSN Money Stock Quotes Ash Excel Discussion (Misc queries) 0 May 11th 06 03:26 AM
Stock quotes Craig Excel Discussion (Misc queries) 3 April 30th 05 11:11 PM


All times are GMT +1. The time now is 07:10 AM.

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"