Target.Value dont work with cell containing RTD function that display streaming stock price.

marwanco

New Member
Joined
Mar 26, 2019
Messages
1
Im testing the following code empty excel sheet:
---------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Target.Value > 280 Then Cells(1, 2) = 99
End If
End Sub
----------------------------------------------------------
If I manually change A1 to 281, then Cells(1,2) or B1 will change to 99, all good.
BUT, A1 is dynamically updated with stock price with RTD function ,=RTD("tos.rtd", , "LAST", "SPY") , in this case Cells(1,2) or B1 is not changing!
Price in A1 is updated once per second on average.
VBA version is 7.1
Thanks in advance.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Welcome to the forum.

A Worksheet_Change event doesn't respond to formulas recalculating. You'd need to use something like Worksheet_Calculate instead.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top