Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA in a webpage aclay Excel Programming 0 August 11th 08 08:10 PM
Publishing Webpage? mpenkala Excel Discussion (Misc queries) 0 June 3rd 08 01:52 PM
Updating an excel chart on a webpage Anthony Blackburn Charts and Charting in Excel 1 May 29th 06 05:16 AM
When updating a worksheet, how do I create a link updating the sa. Phlashh Excel Worksheet Functions 9 January 27th 05 06:05 PM
rondebruin's webpage R.VENKATARAMAN Excel Discussion (Misc queries) 1 January 27th 05 02:11 AM


All times are GMT +1. The time now is 03:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"