A
andreas
Hi,
Who can gives me a explanation for this
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim xlApp As New Excel.Application()
Dim sngLoon As Single
sngLoon = xlApp.WorksheetFunction.Pmt(0.09 / 12, 360, 150000)
TextBox1.Text = Format(Math.Abs(sngLoon), "c")
xlApp.Quit()
Dim myprocesses() As Process
Dim myprocess As Process
myprocesses = Process.GetProcessesByName("excel")
For Each myprocess In myprocesses
myprocess.CloseMainWindow()
Next
MsgBox(IsNothing(xlApp).ToString)
sngLoon = xlApp.WorksheetFunction.Pmt(0.09 / 12, 360, 1500)
TextBox1.Text = Format(Math.Abs(sngLoon), "c")
End Sub
xlapp must be closed with xlapp.quit and also with
....myprocess.closemainwindow ( or not ?)
the msgbox gives false and i have also a second calculation in the textbox
How is this possible and how can i close the program excel if it is not ?
Thanks for any response
Who can gives me a explanation for this
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim xlApp As New Excel.Application()
Dim sngLoon As Single
sngLoon = xlApp.WorksheetFunction.Pmt(0.09 / 12, 360, 150000)
TextBox1.Text = Format(Math.Abs(sngLoon), "c")
xlApp.Quit()
Dim myprocesses() As Process
Dim myprocess As Process
myprocesses = Process.GetProcessesByName("excel")
For Each myprocess In myprocesses
myprocess.CloseMainWindow()
Next
MsgBox(IsNothing(xlApp).ToString)
sngLoon = xlApp.WorksheetFunction.Pmt(0.09 / 12, 360, 1500)
TextBox1.Text = Format(Math.Abs(sngLoon), "c")
End Sub
xlapp must be closed with xlapp.quit and also with
....myprocess.closemainwindow ( or not ?)
the msgbox gives false and i have also a second calculation in the textbox
How is this possible and how can i close the program excel if it is not ?
Thanks for any response