Article ID: 159974
Article Last Modified on 7/1/2004
Private Sub Command1_Click()
MsgBox MyVal(Text1.Text)
End Sub
Private Function MyVal(s As String) As Double
Dim xl As Object
Set xl = CreateObject("excel.application")
xl.Workbooks.Add
xl.ActiveCell.Formula = "=" & s
MyVal = xl.ActiveCell.Value
xl.ActiveWorkbook.Close savechanges:=False
xl.Quit
Set xl = Nothing
End Function
Keywords: kbhowto kbprogramming KB159974