
Access 95 and (Excel 97 and Excel 95)
In such cases, please always try to include the exact code that you're
using. Helps us (well me at least) understand and track problems faster.
Here's how I'm constructing a formula. This works both in Excel 95 and 97.
stFormula = "=IF(sF!R1C1, sAD!R[-" & (mintRow - (0 *
intOffset) - 2) & "]C,0)" _
& "+ IF(sF!R2C1,sAD!R[-" & (mintRow - (1 * intOffset) -
2) & "]C,0)" _
& "+ IF(sF!R3C1,sAD!R[" & -(mintRow - (2 * intOffset) -
2) & "]C,0)" _
& "+ IF(sF!R4C1,sAD!R[" & -(mintRow - (3 * intOffset) -
2) & "]C,0)"
or maybe
stFormula2 = "=R" & aintCellX(i + 1, j) _
& "C" & aintCellY(i + 1, j) & "/If(R" _
& aintCellX(0, j) & "C" & aintCellY(0,
j) _
& "=0,1,R" _
& aintCellX(0, j) & "C" & aintCellY(0,
j) & ")"
HTH
--
Dev Ashish (Just my $.001)
---------------
The Access Web ( http://home.att.net/~dashish )
---------------
:I have a report which I create in Excel 95/7.0a from Access 95/7.0, using
:OLE automation. Run-time error 1005 - Error in formula ...occurs (I piece
:together an '=' formula and try to polace it into an Excel cell). I look it
:up and Microsoft confirms this problem in Excel 95, but corrected in Excel
:97. I tested this code for Excel 97 and it works just fine.
:Now my client tells me that Excel 95/7.0 needs to be on his machine. I need
:to get his to run Excel 97 along with it. However, the application will
:require extensive modification to run in Access 97 from Access 95. My
:client is not ready for this yet, so I will need to run Access 95 and Excel
:95 and Excel 97 on one PC.
:The References section under tools does not provide me with the ability to
:reference Excel 8.0 *.olb files. When I run the application, it creates an
:Excel 7.0 instance and then locks my machine. I need to set-up my code so
:that Access 95 Creates an Excel 8.0 instance.
:
:Any suggestions.. or help is greatly appreciated... TIA,
:
:Steve