Hello All,
I am new to the site and to programming in general. I am writing this code in VBA studio 2010 and wanted a certain function out of it. I built a menu and want to set the code in a way that will close the application after I click on the button so for example if I want to click on the specific toolstrip menu item I want the application to take me to the destination but close at the same time. this is the code for one button that I have put together.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
IO.File.WriteAllBytes(IO.Path.GetTempPath + "HOME.PDI", My.Resources.Home)
End Sub
Private Sub ToolStripMenuItem10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem10.Click
Process.Start("C:\Documents and Settings\wassim99\Desktop\homework1.doc")
End Sub
I tried close.me and it killed the application I think it closed it right after it started.
I know I have to link a close function with the click so the click will have 2 jobs, 1 take me to destination and then close application, but I dont know how to put it together.
thanks for the help all i appreciate it.
I am new to the site and to programming in general. I am writing this code in VBA studio 2010 and wanted a certain function out of it. I built a menu and want to set the code in a way that will close the application after I click on the button so for example if I want to click on the specific toolstrip menu item I want the application to take me to the destination but close at the same time. this is the code for one button that I have put together.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
IO.File.WriteAllBytes(IO.Path.GetTempPath + "HOME.PDI", My.Resources.Home)
End Sub
Private Sub ToolStripMenuItem10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem10.Click
Process.Start("C:\Documents and Settings\wassim99\Desktop\homework1.doc")
End Sub
I tried close.me and it killed the application I think it closed it right after it started.
I know I have to link a close function with the click so the click will have 2 jobs, 1 take me to destination and then close application, but I dont know how to put it together.
thanks for the help all i appreciate it.