LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ActiveCell issues


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

 
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
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
activecell slikity Excel Programming 7 December 13th 04 11:59 AM
use of activecell inquirer Excel Programming 8 May 16th 04 06:39 AM
Activecell value Shamsul Islam Excel Programming 5 April 30th 04 10:10 PM
how to set activecell? ljb[_2_] Excel Programming 2 November 18th 03 04:49 PM


All times are GMT +1. The time now is 12:19 PM.

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"