Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default execute code after web query

Hi there,

I have some web querys running (which download stock prices from yahoo
finance). THese are set to update every few minutes (via the
refreshperiod property).

I'd like to be able to keep historical records of everything that is
downloaded with each webquery. I fugre that the best way of doing this
is to copy the results of each query into a separate table.

Which brings me to my question... Is there any way to get a piece of
code to execute immediately after vba / excel has performed one of
it's web query refreshes? I imagine the other way is to have a loop
which just copies all the results every few minutes, but this seems a
bit hit and miss to me (and will pbly stop vba doing anything else
useful in the meantime).

Many thanks,

Chris

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default execute code after web query

Great idea - many thanks Nigel


On Jul 11, 9:46*am, "Nigel" wrote:
Not sure if this is the solution, but why not monitor the cells where the
data is written for changes and then use this event to trigger updating a
history log?

The following is monitoring range A1:C3 for changes

Private Sub Worksheet_Change(ByVal Target As Range)
*With Target
* If .Row = 1 And .Row <= 3 And .Column = 1 And .Column <= 3 Then
* * * 'copy the log
* * * MsgBox "Here"
* End If
*End With
End Sub
--

Regards,
Nigel


"christian_spaceman" wrote in message

...



Hi there,


I have some web querys running (which download stock prices from yahoo
finance). THese are set to update every few minutes (via the
refreshperiod property).


I'd like to be able to keep historical records of everything that is
downloaded with each webquery. I fugre that the best way of doing this
is to copy the results of each query into a separate table.


Which brings me to my question... Is there any way to get a piece of
code to execute immediately after vba / excel has performed one of
it's web query refreshes? I imagine the other way is to have a loop
which just copies all the results every few minutes, but this seems a
bit hit and miss to me (and will pbly stop vba doing anything else
useful in the meantime).


Many thanks,


Chris- Hide quoted text -


- Show quoted text -


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
Best way to execute an SQL Query on an Excel Worksheet Jenny C. Excel Programming 5 November 24th 06 04:17 PM
How can I execute this query? wliong[_10_] Excel Programming 0 March 7th 06 07:30 PM
Execute a query from a macro Ken Schmidt Excel Programming 0 June 26th 04 09:59 PM
Macro to execute on WEB Query Refresh Donnie Stone Excel Programming 1 September 30th 03 02:16 PM
Execute a query against an excel doc and a sql server db Rick[_14_] Excel Programming 1 August 30th 03 02:50 PM


All times are GMT +1. The time now is 05:21 PM.

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"