the first sub runs when i press a button. the first thing it does is checks if a filepath in a text box exists, using another sub. if the path does not exist i want it to finish withough doing any more work in the first sub. once i can do this i will be doing it for several more text boxes and directories.
Private Sub btnApplyandClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnApplyandClose.Click
dir1FileExists() 'if the file does not exist, exit sub
uninitiatehotkey()
initiatehotkey()
ShowNotifyIcon()
End Sub
Private Sub dir1FileExists()
Dim sFileName As String
sFileName = ("textapp1dir.text")
Dim fFile As New FileInfo(sFileName)
If Not fFile.Exists Then
MessageBox.Show("Please check the directory of Application 1")
End If
End Sub
also, how can i pass in the text box name so i do not have to repeat sub2 for each text box and dir path?
2007-01-09
14:59:10
·
3 answers
·
asked by
Anonymous