Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Updating from Webpage
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Updating from Webpage
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 USA http://www.mediafire.com/PrimitiveSoftware (Data Rows Excel add-in: Color rows, Delete rows, Insert rows) "Peter Andrews" wrote in message ... 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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA in a webpage | Excel Programming | |||
Publishing Webpage? | Excel Discussion (Misc queries) | |||
Updating an excel chart on a webpage | Charts and Charting in Excel | |||
When updating a worksheet, how do I create a link updating the sa. | Excel Worksheet Functions | |||
rondebruin's webpage | Excel Discussion (Misc queries) |