ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Web Query (https://www.excelbanter.com/excel-programming/302507-web-query.html)

Ryan Sheehy

Web Query
 
I have a web query that refreshes every minute obtaining a table from
a website.

What I would like to do is to log changes that are made to any part of
the table on to a separate sheet (or area on the sheet) - just the
entire rows that had cells that did change.

As an example with the first update that is done the table that is
returned would look like this:

A 12
B 14
C 15

Due to this being the first table recorded the entire table would be
logged. Let us assume that upon the second update (a minute later) the
table that is received is as follows:

A 12
B 14
C 15

Now because there is NO change to the last table nothing new is
logged. However, if in the next minute the table that is received
looks like this...

A 11v
B 14
C 15

Then I would like the log to include the first table that was
recorded, but now the entire row that has the change the row
containing the data "A 11v". Therefore, the log would like this...

A 12
B 14
C 15
A 11v

Thanks in advance for anyone's ideas, or help.


Ryan

Ryan Sheehy

Web Query
 
I have been able to create the macro, but how do I go about prompting
the macro after when I have received the web update??

For some strange reason the "Change" Worksheet procedure does not seem
to work.


Ryan


(Ryan Sheehy) wrote in message . com...
I have a web query that refreshes every minute obtaining a table from
a website.

What I would like to do is to log changes that are made to any part of
the table on to a separate sheet (or area on the sheet) - just the
entire rows that had cells that did change.

As an example with the first update that is done the table that is
returned would look like this:

A 12
B 14
C 15

Due to this being the first table recorded the entire table would be
logged. Let us assume that upon the second update (a minute later) the
table that is received is as follows:

A 12
B 14
C 15

Now because there is NO change to the last table nothing new is
logged. However, if in the next minute the table that is received
looks like this...

A 11v
B 14
C 15

Then I would like the log to include the first table that was
recorded, but now the entire row that has the change the row
containing the data "A 11v". Therefore, the log would like this...

A 12
B 14
C 15
A 11v

Thanks in advance for anyone's ideas, or help.


Ryan


Don Guillett[_4_]

Web Query
 
try using a worksheet_calculate event instead with a cell somewhere with
=now() to force calculation.

--
Don Guillett
SalesAid Software

"Ryan Sheehy" wrote in message
m...
I have been able to create the macro, but how do I go about prompting
the macro after when I have received the web update??

For some strange reason the "Change" Worksheet procedure does not seem
to work.


Ryan


(Ryan Sheehy) wrote in message
. com...
I have a web query that refreshes every minute obtaining a table from
a website.

What I would like to do is to log changes that are made to any part of
the table on to a separate sheet (or area on the sheet) - just the
entire rows that had cells that did change.

As an example with the first update that is done the table that is
returned would look like this:

A 12
B 14
C 15

Due to this being the first table recorded the entire table would be
logged. Let us assume that upon the second update (a minute later) the
table that is received is as follows:

A 12
B 14
C 15

Now because there is NO change to the last table nothing new is
logged. However, if in the next minute the table that is received
looks like this...

A 11v
B 14
C 15

Then I would like the log to include the first table that was
recorded, but now the entire row that has the change the row
containing the data "A 11v". Therefore, the log would like this...

A 12
B 14
C 15
A 11v

Thanks in advance for anyone's ideas, or help.


Ryan




Dick Kusleika[_3_]

Web Query
 
Ryan

You can use the AfterRefresh event of the querytable. See here

http://www.dicks-blog.com/excel/2004...s_other_e.html

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Ryan Sheehy" wrote in message
m...
I have been able to create the macro, but how do I go about prompting
the macro after when I have received the web update??

For some strange reason the "Change" Worksheet procedure does not seem
to work.


Ryan


(Ryan Sheehy) wrote in message

. com...
I have a web query that refreshes every minute obtaining a table from
a website.

What I would like to do is to log changes that are made to any part of
the table on to a separate sheet (or area on the sheet) - just the
entire rows that had cells that did change.

As an example with the first update that is done the table that is
returned would look like this:

A 12
B 14
C 15

Due to this being the first table recorded the entire table would be
logged. Let us assume that upon the second update (a minute later) the
table that is received is as follows:

A 12
B 14
C 15

Now because there is NO change to the last table nothing new is
logged. However, if in the next minute the table that is received
looks like this...

A 11v
B 14
C 15

Then I would like the log to include the first table that was
recorded, but now the entire row that has the change the row
containing the data "A 11v". Therefore, the log would like this...

A 12
B 14
C 15
A 11v

Thanks in advance for anyone's ideas, or help.


Ryan




Ryan Sheehy

Web Query
 
Thanks Dick & Don.

Both methods worked.


Ryan


"Dick Kusleika" wrote in message ...
Ryan

You can use the AfterRefresh event of the querytable. See here

http://www.dicks-blog.com/excel/2004...s_other_e.html

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Ryan Sheehy" wrote in message
m...
I have been able to create the macro, but how do I go about prompting
the macro after when I have received the web update??

For some strange reason the "Change" Worksheet procedure does not seem
to work.


Ryan


(Ryan Sheehy) wrote in message

. com...
I have a web query that refreshes every minute obtaining a table from
a website.

What I would like to do is to log changes that are made to any part of
the table on to a separate sheet (or area on the sheet) - just the
entire rows that had cells that did change.

As an example with the first update that is done the table that is
returned would look like this:

A 12
B 14
C 15

Due to this being the first table recorded the entire table would be
logged. Let us assume that upon the second update (a minute later) the
table that is received is as follows:

A 12
B 14
C 15

Now because there is NO change to the last table nothing new is
logged. However, if in the next minute the table that is received
looks like this...

A 11v
B 14
C 15

Then I would like the log to include the first table that was
recorded, but now the entire row that has the change the row
containing the data "A 11v". Therefore, the log would like this...

A 12
B 14
C 15
A 11v

Thanks in advance for anyone's ideas, or help.


Ryan



All times are GMT +1. The time now is 01:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com