Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel VBA macros and real time data calculations

I have written an excel macro in a spreadsheet that subscribes to real
time market data. The marco loops through a list of symbols. For each
symbol it places the symbol on a summary sheet in cell A1. this sheet
downloads some specific data for that symbol. The code then takes some
specific cells C5 D5 D7 and takes these values and puts them on the
"final" sheet next to the symbol. this creates a sheet for all the
syumbols with all the relavant data needed for rankings. However when
the Macro executes it does not allow Excel to get the real time data.
Instead it runs through the whole macro before alling the outside data.

When it does call the outside data it makes a call for each symbol.
However this is done after the macro completes. I think I am missing
some system call to allow the macro to execute outside calculations
before looping through the next symbol. any help would be greatly
appreciated.


Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Excel VBA macros and real time data calculations

Have you tried adding "DoEvents" to allow things to complete before execution
continues?
--
HTH...

Jim Thomlinson


" wrote:

I have written an excel macro in a spreadsheet that subscribes to real
time market data. The marco loops through a list of symbols. For each
symbol it places the symbol on a summary sheet in cell A1. this sheet
downloads some specific data for that symbol. The code then takes some
specific cells C5 D5 D7 and takes these values and puts them on the
"final" sheet next to the symbol. this creates a sheet for all the
syumbols with all the relavant data needed for rankings. However when
the Macro executes it does not allow Excel to get the real time data.
Instead it runs through the whole macro before alling the outside data.

When it does call the outside data it makes a call for each symbol.
However this is done after the macro completes. I think I am missing
some system call to allow the macro to execute outside calculations
before looping through the next symbol. any help would be greatly
appreciated.


Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel VBA macros and real time data calculations

Set the Backgroundquery property to False

--
Regards,
Tom Ogilvy


wrote in message
oups.com...
I have written an excel macro in a spreadsheet that subscribes to real
time market data. The marco loops through a list of symbols. For each
symbol it places the symbol on a summary sheet in cell A1. this sheet
downloads some specific data for that symbol. The code then takes some
specific cells C5 D5 D7 and takes these values and puts them on the
"final" sheet next to the symbol. this creates a sheet for all the
syumbols with all the relavant data needed for rankings. However when
the Macro executes it does not allow Excel to get the real time data.
Instead it runs through the whole macro before alling the outside data.

When it does call the outside data it makes a call for each symbol.
However this is done after the macro completes. I think I am missing
some system call to allow the macro to execute outside calculations
before looping through the next symbol. any help would be greatly
appreciated.


Thanks



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel VBA macros and real time data calculations

I tried both doEvents and BackgroundQuery to false but neither one
worked. Thanks for the suggestions though

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel VBA macros and real time data calculations

then perhaps you are not doing it properly. That is the property that
controls what you are complaining about - at least for querytables which it
sounds like you are using.

--
Regards,
Tom Ogilvy

wrote in message
oups.com...
I tried both doEvents and BackgroundQuery to false but neither one
worked. Thanks for the suggestions though





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Excel VBA macros and real time data calculations

Hi,

I presume you are using DDE to pull in real time data?

You cannot RELIABLY run a macro to pull in real time data and manipulate it
within the same call to VBA.

You need to create two buttons and split the workload (if this is a DDE
question).

I've been working with DDE for far too long - it's a nasty technology. Good
luck.

--
www.alignment-systems.com


" wrote:

I have written an excel macro in a spreadsheet that subscribes to real
time market data. The marco loops through a list of symbols. For each
symbol it places the symbol on a summary sheet in cell A1. this sheet
downloads some specific data for that symbol. The code then takes some
specific cells C5 D5 D7 and takes these values and puts them on the
"final" sheet next to the symbol. this creates a sheet for all the
syumbols with all the relavant data needed for rankings. However when
the Macro executes it does not allow Excel to get the real time data.
Instead it runs through the whole macro before alling the outside data.

When it does call the outside data it makes a call for each symbol.
However this is done after the macro completes. I think I am missing
some system call to allow the macro to execute outside calculations
before looping through the next symbol. any help would be greatly
appreciated.


Thanks


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
Capturing Real Time Data Rob Excel Worksheet Functions 2 February 24th 10 04:44 AM
Payroll calculations for real time orlcgm Excel Worksheet Functions 2 October 6th 09 04:23 PM
Excel 2003's autosum does not update data in real time KokWoei Excel Worksheet Functions 2 April 4th 06 05:12 AM
excel focus problems with custom RTD server (real time data) S Guy Excel Programming 3 February 1st 05 06:24 PM


All times are GMT +1. The time now is 03:38 PM.

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

About Us

"It's about Microsoft Excel"