Solved

Farpoint Spread Formula in VB App

Posted on 2003-12-12
6
2,006 Views
Last Modified: 2012-10-24
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.
0
Comment
Question by:rekhasri
  • 3
  • 2
6 Comments
 
LVL 14

Expert Comment

by:Tommy Kinard
ID: 9930418
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
 
LVL 2

Author Comment

by:rekhasri
ID: 9939863
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
 
LVL 14

Expert Comment

by:Tommy Kinard
ID: 9941693
Sorry misread the question, don't think I will be any help here.

dragontooth

0
 
LVL 2

Accepted Solution

by:
rekhasri earned 0 total points
ID: 9946992
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
 
LVL 14

Expert Comment

by:Tommy Kinard
ID: 9949394
rekhasri,

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

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

dragontooth
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
wordsWithoutList  challenge 24 73
sumHeights  challenge 17 60
VB6 Compile Compatibility Issue 4 28
base64 decode encode 12 96
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now