Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Capturing Steaming Data Macro problem?


Hello everyone...

I am trying to capture the highest high and lowest low in streamin
data. What I have done is not working correctly and I am at a loss ho
to correct it, here are the results:

I am using this:

If bid < oldlo Then
lo = bid
End If
oldlo = lo

If ask oldhi Then
hi = ask
End If
oldhi = hi


I thought this would capture and latch the highest Hi value and lowes
low of the stream and increment each time a new hi was or lo wa
reached.

Instead of latching it, it enters the data request string,
<=edemo|tik!id558?ask into the cell and it does not latch the data a
I expected it should, it enters the ask string rather than a value...
I dont think it is possible to latch anything in the spreadsheet and t
the best of my knowledge vb is the only way to accomplish this.

I am very lost on how to handle data in this manner.

Does anyone have an idea how I can get streaming data to latch an
paint an output to a cell that can be further operated on once i
excel?

a snipped version of the code is below...

Dim bid As String
Dim ask As String
Dim hi As String
Dim lo As String
Dim oldhi As String
Dim oldlo As String

bid = server & topic & id & "bid"
ask = server & topic & id & "ask"

'HOD and LOD
If bid < oldlo Then
lo = bid
End If
oldlo = lo

If ask oldhi Then
hi = ask
End If
oldhi = hi

ActiveCell.offset(0, 2).Value = bid
ActiveCell.offset(0, 3).Value = ask
ActiveCell.offset(0, 7).Value = hi
ActiveCell.offset(0, 8).Value = l

--
rnrs
-----------------------------------------------------------------------
rnrss's Profile: http://www.excelforum.com/member.php...fo&userid=2782
View this thread: http://www.excelforum.com/showthread.php?threadid=47492

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Capturing Steaming Data Macro problem?


Tnanks for the response Simon;

using this:
If bid < oldlo Then
oldlo = bid
End If
If ask oldhi Then
oldhi = ask
End If

and this:
ActiveCell.offset(0, reqOffset + 7).Value = oldhi
ActiveCell.offset(0, reqOffset + 8).Value = oldlo

gave the same results as the original does...


--
rnrss
------------------------------------------------------------------------
rnrss's Profile: http://www.excelforum.com/member.php...o&userid=27823
View this thread: http://www.excelforum.com/showthread...hreadid=474926

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Capturing Steaming Data Macro problem?


Just thinking...

Do you think it is possible that because it is streaming that it sort
of resets itself with each new entry or something crazy like that?
Somehting wierd mtst be going on because it seems to me both these
methods should have worked...


--
rnrss
------------------------------------------------------------------------
rnrss's Profile: http://www.excelforum.com/member.php...o&userid=27823
View this thread: http://www.excelforum.com/showthread...hreadid=474926

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Capturing Steaming Data Macro problem?


Here is another update:

tried this and here are the results:

cell p8 is <=edemo13|tik!id0?bid
cell p9 is <=edemo13|tik!id0?ask

in excel in cell 21 i entered <=p8 the cell for the bid and same wit
the ask where cell 22 <=q8

then I told vb to get the values and rewrite them into cells 23 and 2
respectively just to see if it would work and I get a type mismatc
error...

bid1 = ActiveCell.offset(0, 21).Value
ask1 = ActiveCell.offset(0, 22).Value
ActiveCell.offset(0, 23).Value = bid1
ActiveCell.offset(0, 24).Value = ask1

Everything I try doesnt work..

--
rnrs
-----------------------------------------------------------------------
rnrss's Profile: http://www.excelforum.com/member.php...fo&userid=2782
View this thread: http://www.excelforum.com/showthread.php?threadid=47492

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 all of the data jimbo Excel Worksheet Functions 7 July 27th 08 06:10 PM
Capturing data using a formula JR Excel Discussion (Misc queries) 9 February 15th 06 11:59 PM
Capturing the selected tab in a worksheet_deactivate macro jkitzy Excel Programming 1 December 24th 04 09:01 PM
Macro help in capturing server time saurabhb Excel Programming 0 September 16th 04 10:48 AM
Help : Macro for capturing current system time imr Excel Programming 3 July 2nd 04 02:58 AM


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