Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Stock Quotes #VALUE for some entires on update | Excel Discussion (Misc queries) | |||
MSN Stock Quotes Addin fails to update | Excel Worksheet Functions | |||
MSN Stock Quotes | Excel Discussion (Misc queries) | |||
How do i get historical stock quotes using MSN Money Stock Quotes | Excel Discussion (Misc queries) | |||
Stock quotes | Excel Discussion (Misc queries) |