This code is supplied by my broker and I was hoping to modify their cod
rather than my excel sheet. The problem I am having is the data entr
section. Offsetting the write to sheet data works fine...
I need this to offset 5, so I enter: symbol
UCase(ActiveCell.offset(0, 5).Value)
For some strange reason when I enter the symbol I get entry erro
messages that I must at least enter sec type even though the sectype i
there...
' get contract description '(enter input data)
symbol = UCase(ActiveCell.offset(0, 0).Value)
secType = UCase(ActiveCell.offset(0, 1).Value)
expiry = ActiveCell.offset(0, 2).Value
'snipped the rest
SO I thought I would assign it as a Const like the one below that work
and the sheet...
So I added:
Const reqEntryOffset = 5
Like this:
' get contract description
symbol = UCase(ActiveCell.offset(0, reqEntryOffset + 0).Value)
secType = UCase(ActiveCell.offset(0, reqEntryOffset + 1).Value)
expiry = ActiveCell.offset(0, reqEntryOffset + 2).Value
and unfortunately still have entry errors, did I miss something maybe
Could it be that I am using excel 2000 maybe? I am a noob to
vb/exce
so I find this baffling, any help would be greatly appreciated and i
someone wants to look at the whole file I will be glad to post or sen
it...
' Place tickReq in spreadsheet '(write dde data to sheet)
Const tickReqOffset = 10
ActiveCell.offset(0, tickReqOffset).Formula = server & topic & id
tickReqType & "?" & tickReq
ActiveCell.offset(0, tickReqOffset + 1).Formula = server & topic
id & "bidSize"
ActiveCell.offset(0, tickReqOffset + 2).Formula = server & topic
id & "bid"
ActiveCell.offset(0, tickReqOffset + 3).Formula = server & topic
id & "ask"
'snipped the middle
ActiveCell.offset(1, 0).Activate
End Sub
Thanks,
rn
--
rnrs
-----------------------------------------------------------------------
rnrss's Profile:
http://www.excelforum.com/member.php...fo&userid=2782
View this thread:
http://www.excelforum.com/showthread.php?threadid=47332