473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Can VB.net reuse Excel's math library?

sam

There are many formuls' library in Excel.
Can I call them in my VB program?

Thanks.
Nov 19 '05 #1
1 4718
On Mon, 25 Aug 2003 08:29:08 -0700, "sam" <s9******@cc.ncu.edu.tw> wrote:

¤
¤ There are many formuls' library in Excel.
¤ Can I call them in my VB program?

The following code uses a function (XIRR) from the Analysis TookPak

Private Sub RunExcelFunction_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles RunExcelFunction.Click

Dim td(3) As Integer
Dim td1(3) As Date
td(0) = -100
td(1) = 200
td(2) = 200

td1(0) = #8/1/2000#
td1(1) = #9/1/2000#
td1(2) = #10/1/2000#

Dim objExcel As New Excel.Application()

objExcel.RegisterXLL("C:\Program Files\Microsoft
Office\Office\Library\Analysis\ANALYS32.XLL")

Dim dos As Double
dos = CType(objExcel.Run("XIRR", td, td1), Double)

objExcel.Quit()
objExcel = Nothing

End Sub
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bram Stolk | last post by:
Hi there, I am accessing Excel's functionality via COM, by using the win32com extention. This works somewhat: If I run it from the 'IDLE' editor, I get frequent hangs or errors. Sometimes...
2
by: Niyazi | last post by:
Hi, I have to retrieve a data from AS400 DB2 and after working with data I have to export into one of existing Excel file. I can connect into specific library in AS400 DB2 using AS400...
0
by: DMolter | last post by:
I'm trying to define a math problem in excel, so for example a 4 cell block where A1 contians nothing, B1 contains the number 2, A2 contains the '+' sign and B2 contains the number 3, forming a...
8
by: Sensei | last post by:
I have a quick question about the math library included in the standard C90 (and 99). The gcc, xlc and possibly other compilers/linkers on some unix platforms cannot use any math functions in...
110
by: Gregory Pietsch | last post by:
I'm writing a portable implementation of the C standard library for http://www.clc-wiki.net and I was wondering if someone could check the functions in math.h for sanity/portability/whatever. I'm...
8
by: Edward Diener | last post by:
By reuse, I mean a function in an assembly which is called in another assembly. By a mixed-mode function I mean a function whose signature has one or more CLR types and one or more non-CLR...
19
by: jacob navia | last post by:
There is an interesting discussion running in Slashdot now, about code reuse. The thema of the discussion is here: < quote > Susan Elliot Sim asks: "In the science fiction novel, 'A Deepness...
0
by: schizoid_man | last post by:
Hi, I've written the class below and compiled it with the 'Register for COM Interop' option set to true and I can see the resulting .dll file. However, I can not successfully pull it into the...
17
by: Lenni | last post by:
Hi, I'm currently writing a web application for bicycle wheel builders that calculate the spoke length for all sorts of variations of hubs and rims. I have translated the formula from an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.