ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   running a macro on every refresh of the screen (https://www.excelbanter.com/excel-programming/324369-running-macro-every-refresh-screen.html)

shovit sahai

running a macro on every refresh of the screen
 
Hi,

I have a spreadsheet which is linked to live feeds from say Reuters. I
need to write a macro which auto-runs itself every time the spreadsheet
refreshes, or there is change in any of its cells. Something to the
effect "On every refresh, Do bla bla bla". Is there a way to implement
this in VB?

TIA

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jake Marx[_3_]

running a macro on every refresh of the screen
 
Hi shovit,

Yes - you can use the Worksheet_Change event subroutine to do this. To get
there, just right-click the worksheet's tab in Excel and select View Code.
Then, change the left dropdown above the code module to Worksheet, then
change the right dropdown to Change. Call your macro from that subroutine,
and each time any cell on the Worksheet changes, your macro will be
executed.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


shovit sahai wrote:
Hi,

I have a spreadsheet which is linked to live feeds from say Reuters. I
need to write a macro which auto-runs itself every time the
spreadsheet refreshes, or there is change in any of its cells.
Something to the effect "On every refresh, Do bla bla bla". Is there
a way to implement this in VB?

TIA

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



WAYNE

running a macro on every refresh of the screen
 
Does this work when a cell is paste linked to another
excel file and that file changes, does that trigger the
on change event?

Wayne

-----Original Message-----
Hi shovit,

Yes - you can use the Worksheet_Change event subroutine

to do this. To get
there, just right-click the worksheet's tab in Excel and

select View Code.
Then, change the left dropdown above the code module to

Worksheet, then
change the right dropdown to Change. Call your macro

from that subroutine,
and each time any cell on the Worksheet changes, your

macro will be
executed.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address

unmonitored]


shovit sahai wrote:
Hi,

I have a spreadsheet which is linked to live feeds

from say Reuters. I
need to write a macro which auto-runs itself every

time the
spreadsheet refreshes, or there is change in any of

its cells.
Something to the effect "On every refresh, Do bla bla

bla". Is there
a way to implement this in VB?

TIA

*** Sent via Developersdex

http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for

it!

.


Jake Marx[_3_]

running a macro on every refresh of the screen
 
Hi Wayne,

Are you referring to DDE, web queries, or something else?

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Wayne wrote:
Does this work when a cell is paste linked to another
excel file and that file changes, does that trigger the
on change event?

Wayne

-----Original Message-----
Hi shovit,

Yes - you can use the Worksheet_Change event subroutine to do this.
To get there, just right-click the worksheet's tab in Excel and
select View Code. Then, change the left dropdown above the code
module to Worksheet, then change the right dropdown to Change. Call
your macro from that subroutine, and each time any cell on the
Worksheet changes, your macro will be executed.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


shovit sahai wrote:
Hi,

I have a spreadsheet which is linked to live feeds from say
Reuters. I need to write a macro which auto-runs itself every time
the spreadsheet refreshes, or there is change in any of its cells.
Something to the effect "On every refresh, Do bla bla bla". Is there
a way to implement this in VB?

TIA

*** Sent via Developersdex

http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


.


WAYNE

running a macro on every refresh of the screen
 
I did a paste all - link from several other excel
spreadsheets. I notice when I update them the master
spreadsheet is updated with new values. I tried to
trigger the macro and the funny thing was it would
trigger when i updated one of the subsidiary spreadsheets
but not on the others, although the updates did happen.

Wayne
-----Original Message-----
Hi Wayne,

Are you referring to DDE, web queries, or something else?

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address

unmonitored]


Wayne wrote:
Does this work when a cell is paste linked to another
excel file and that file changes, does that trigger the
on change event?

Wayne

-----Original Message-----
Hi shovit,

Yes - you can use the Worksheet_Change event

subroutine to do this.
To get there, just right-click the worksheet's tab in

Excel and
select View Code. Then, change the left dropdown

above the code
module to Worksheet, then change the right dropdown

to Change. Call
your macro from that subroutine, and each time any

cell on the
Worksheet changes, your macro will be executed.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address

unmonitored]


shovit sahai wrote:
Hi,

I have a spreadsheet which is linked to live feeds

from say
Reuters. I need to write a macro which auto-runs

itself every time
the spreadsheet refreshes, or there is change in any

of its cells.
Something to the effect "On every refresh, Do bla

bla bla". Is there
a way to implement this in VB?

TIA

*** Sent via Developersdex

http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for

it!

.

.


Jake Marx[_3_]

running a macro on every refresh of the screen
 
Hi Wayne,

I think you're correct in that external links do not cause the
Worksheet_Change event to fire. But the Worksheet_Calculate event does
fire, so you may be able to use that.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Wayne wrote:
I did a paste all - link from several other excel
spreadsheets. I notice when I update them the master
spreadsheet is updated with new values. I tried to
trigger the macro and the funny thing was it would
trigger when i updated one of the subsidiary spreadsheets
but not on the others, although the updates did happen.

Wayne
-----Original Message-----
Hi Wayne,

Are you referring to DDE, web queries, or something else?

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Wayne wrote:
Does this work when a cell is paste linked to another
excel file and that file changes, does that trigger the
on change event?

Wayne

-----Original Message-----
Hi shovit,

Yes - you can use the Worksheet_Change event subroutine to do this.
To get there, just right-click the worksheet's tab in Excel and
select View Code. Then, change the left dropdown above the code
module to Worksheet, then change the right dropdown to Change.
Call your macro from that subroutine, and each time any cell on the
Worksheet changes, your macro will be executed.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


shovit sahai wrote:
Hi,

I have a spreadsheet which is linked to live feeds from say
Reuters. I need to write a macro which auto-runs itself every time
the spreadsheet refreshes, or there is change in any of its cells.
Something to the effect "On every refresh, Do bla bla bla". Is
there a way to implement this in VB?

TIA

*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

.

.




All times are GMT +1. The time now is 09:08 AM.

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