We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Public Function jzTINV(intProb As Double, intFree As Double) As Double ' Calculates the Inverse T-Distribution using a work around. As the formula TINV is not in Visual Basic, ' and it is quite complex mathematics, i have created this work around. ' It is a little slow, but works (around 5 to 10 calcs a sec, depending on computer) Dim intOut As Double Dim objExcel As Object Dim objWorkbook As Object Dim objWorksheet As Object Set objExcel = CreateObject("Excel.Application") objExcel.Visible = False Set objWorkbook = objExcel.Workbooks.Add() Set objWorksheet = objWorkbook.Worksheets(1) objWorksheet.Activate objExcel.cells(1, 2) = intProb objExcel.cells(1, 3) = intFree objExcel.cells(1, 1) = "=TINV(b1,c1)" intOut = objExcel.cells(1, 1).Value jzTINV = intOut objWorkbook.Close False objExcel.Quit End Function