Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button1.Enabled = False
Dim myProcess As New System.Diagnostics.Process
myProcess.StartInfo.FileName = "C:\oldf\MYEXCEL\calconepercentile.xls"
myProcess.EnableRaisingEvents = True
AddHandler myProcess.Exited, AddressOf myProcess_Exited
myProcess.Start()
End Sub
Private Sub myProcess_Exited(ByVal sender As Object, ByVal e As System.EventArgs)
Button1.Enabled = True
' ... more code here ...
End Sub
|