Farpoint Spread Formula in VB App

Hi,

I  need to write custom formula for spread in my application, but so far i have tried using only normal formulas even which arent working.

with vaSpread1
       .row = 1
       .col = 1
       .value = 1

       .row = 1
       .col = 2
       .value = 2

       .recalc = true
       .row = 1
       .col = 3
       .formula = "SUM(A1,B1)"
       
end with


But i dont find the value reflected in that cell when i run the code. Plez help.. this is urgent and its driving me nuts..

would have loved to assign lots of points but dont have that many.. so plez bear..

thanks in advance,
RS.
LVL 2
rekhasriAsked:
Who is Participating?
 
rekhasriConnect With a Mentor Author Commented:
hi folks,

i have decided to use excel here instead of  spread, and just populated it using ado..

there is something called.

CopyFromRecordset.. which was really cool..

so, there goes.. i think i will close this question.
0
 
Tommy KinardCommented:
Hi rekhasri,

The below code should help

set vaSpread1 = ActiveWorkbook.Sheets("NameOfWorkSheet")
With vaSpread1
       .Cells(1, 1).Value = 1
       .Cells(1, 2).Value = 2
       .Cells(1, 3).Formula = "=SUM($A$1:$B$1)"
       .Calculate
End With

dragontooth

0
 
rekhasriAuthor Commented:
Hi dragontooth..

what is ActiveWorkBook? i want to avoid using excel here..

is there any way of simply using formulae in spread?

thanks,
RS.
0
 
Tommy KinardCommented:
Sorry misread the question, don't think I will be any help here.

dragontooth

0
 
Tommy KinardCommented:
rekhasri,

Go here to ask for this question to be deleted and your points refunded.

http://www.experts-exchange.com/Community_Support/

dragontooth
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.