Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Formula

Status
Not open for further replies.

shavon

Programmer
Jun 18, 2001
102
CA
How do i insert a formula into an Excel spreadsheet from VB6 please?

Thank you
 
well if you're referencing the excel spreadsheet through the excel object library....

i.e.
Code:
Dim oExcel As New Excel.Application

Then all you need to do is set the cell's contents to the formula.

Code:
oExcel.Range("A1") = "=SUM(A1:A35)"


Hope that helps! :)
--NiPSMG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top