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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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!

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default 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!


.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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!

.

.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default 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!

.

.


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
Hide screen movements when a macro is running STatAGL Excel Discussion (Misc queries) 4 April 3rd 23 06:54 PM
EXCEL 2007 CHART REFRESH WHILE MACRO IS RUNNING MikeM Charts and Charting in Excel 1 April 20th 09 07:38 AM
Running a macro from an auto-refresh Chris Youlden Excel Worksheet Functions 2 October 7th 07 04:22 PM
Auto refresh and DDE update is not work when running macro Eddy[_5_] Excel Programming 0 July 13th 04 10:08 AM
How to stop screen blinking when running macro Stephen[_6_] Excel Programming 1 June 3rd 04 11:51 AM


All times are GMT +1. The time now is 10:44 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"