View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default Updating from Webpage

On Aug 30, 7:31*am, "Jim Cone" wrote:
The Change event doesn't occur when cells change during a recalculation.
That sounds like your situation. You could use the Calculate event instead.
That requires a formula similar to: =Today() in a cell on the sheet to force calculation.
Use code like this in the sheet module...
'---
Private vContent As Variant

Private Sub Worksheet_Calculate()
If vContent < Me.Range("B3").Value2 Then
* *MsgBox "hello world"
* *vContent = Me.Range("B3").Value2
End If
End Sub
'---
Jim Cone
Portland, Oregon USAhttp://www.mediafire.com/PrimitiveSoftware
(Data Rows Excel add-in: Color rows, Delete rows, Insert rows)

"Peter Andrews"
wrote in .. .



Excel 2007 (Home Edition)


I'm *obtaining data from a webpage, however the following works when I manually update cell B3,
but doesn't when the cell is updated automatically by the "Get external data from web" function.
Does the "Get external data from web" function inhibit the Worksheet_Change facility? *...and, if
so, how do I make it work.


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$b$3" Then
MsgBox "Hello World"
End If
End Sub
Many Thanks.- Hide quoted text -


- Show quoted text -

Try
If Target.Address = Range("$b$3").Address Then