$INSERT Problem (OpenInsight 16-Bit)
At 06 MAY 2002 03:00:52PM Richard Richter wrote:
I'm having one of those problems that you know is probably simple and stupid yet I can't find the answer for the life of me.
I use Excel to do a Web Query daily and I read the data into an OI file for storage. Excel 97 does not place the Web Query in the same place as Excel 2000. I am trying to write a program that will read the version of Excel and then $INSERT the proper file with the correct data locations.
I have written the following program:(Actually, a click event)
v=Set_Property(CtrlEntID1,"F.":".EXCEL2","DDESERVICE","EXCEL")
v=Set_Property(CtrlEntID1,"F.":".EXCEL2","DDETOPIC","DailyData.XLSOEX")
RC=R1C141"
v=Set_Property(CtrlEntID1,"F.":".EXCEL2","DDELINK","AUTO")
v=Set_Property(CtrlEntID1,"F.":".EXCEL2","DDEITEM",RC)
Version=Get_Property(CtrlEntID1,"F.":".EXCEL2","DDEDATA")
v=Set_Property(CtrlEntID1,"F.":".EXCEL2","DDELINK","OFF")
Convert Char(13) to "" in Version
Convert Char(10) to "" in Version
Version=Int(Version)
Begin Case
Case Version=9$Insert EXCEL_9_OEXCase Version=8$Insert EXCEL_8_OEXEnd Case
RETURN 0
EXCEL_9_OEX and EXCEL_8_OEX are the same except for the locations. The following is SYSPROCS EXCEL_9_OEX:
!
!
* Equates for Excel Version 9, Instrument OEX
!
!
Equ CloseData$ To "R36C7"
Equ MonthYear1Data$ To "R37C14"
Equ MonthYear2Data$ To "R27C38"
Equ MonthYear3Data$ To "R27C60"
Equ Month1RowStartData$ To "40"
Equ Month1RowFinishData$ To "120"
Equ Month1Strike1ColumnData$ To "14"
Equ Month1Call1ColumnData$ To "7"
Equ Month1Put1ColumnData$ To "16"
Equ Month2RowStartData$ To "30"
Equ Month2RowFinishData$ To "120"
Equ Month2Strike2ColumnData$ To "38"
Equ Month2Call2ColumnData$ To "31"
Equ Month2Put2ColumnData$ To "40"
Equ Month3RowStartData$ To "30"
Equ Month3RowFinishData$ To "120"
Equ Month3Strike3ColumnData$ To "60"
Equ Month3Call3ColumnData$ To "53"
Equ Month3Put3ColumnData$ To "62"
When I try to compile the event, I get the following error message:
B115: Line 28. Label CLOSEDATA$ is used before the EQUATE statement.
Line 28, I believe, refers to the last line of EXCEL_9_OEX.
Any help to figure out what I'm doing wrong would be greatly appreciated.
Thanks,
Richard Richter
At 06 MAY 2002 03:22PM Pat McNerthney wrote:
Richard,
Equates are evaluated at compile time, so I believe your error is the second evaluation of CloseData$ in the second insert.
Instead of "Equ"'s, use assignments, like this:
CloseData$=R36C7"etc.Pat