ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Relative Position in VBA Array (https://www.excelbanter.com/excel-programming/302270-relative-position-vba-array.html)

jgdavis

Relative Position in VBA Array
 
I have the following code:

Function DDEUpdate()
Dim colTimeStamp As String

colTimeStamp = "I"

varr = ThisWorkbook.LinkSources(xlOLELinks)

For i = LBound(varr, 1) To UBound(varr, 1)

If IsEmpty(ThisWorkbook.ActiveSheet.Range (colTimeStamp
i).Value) Then

ThisWorkbook.SetLinkOnData Name:=varr(i)
Procedu="'MyLinkProc " & i & "'"

Else: ThisWorkbook.SetLinkOnData Name:=varr(i)
Procedu=""

End If

Next

End Function


The varr(i) returns the OLElink based on a sorted order and th
Range(colTimeStamp & i) returns the value of i. How do I find the ro
that varr(i) is referencing?

Thanks,

Joh

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 09:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com