|
-
Sep 22nd, 2005, 03:28 PM
#1
Thread Starter
Frenzied Member
msgbox option
im trying to do something like
VB Code:
Private Sub Command1_Click()
'msgbox here asking 'are you sure you want to remove the file with yes/no button, if yes is click, then Kill "C:\test.txt", otherwise Form7.close
End Sub
any ideas how it can be done guys?
-
Sep 22nd, 2005, 03:31 PM
#2
Re: msgbox option
VB Code:
Private Sub Command1_Click()
If MsgBox("Are you sure you want to remove the file?", vbYesNo + vbQuestion) = vbYes Then
Kill "c:\test.txt"
Else
Unload Form7
End If
End Sub
-
Sep 22nd, 2005, 03:33 PM
#3
Re: msgbox option
VB Code:
Private Sub Command1_Click()
'msgbox here asking 'are you sure you want to remove the file with yes/no button, if yes is click, then Kill "C:\test.txt", otherwise Form7.close
If vbYes = MsgBox("Are you sure you want to remove the file?", vbYesNo + vbQuestion) Then
Kill "C:\test.txt"
Else
Unload Form7
End If
End Sub
EDIT:
Joacim wins :D
Last edited by Pradeep1210; Sep 22nd, 2005 at 03:42 PM.
-
Sep 22nd, 2005, 03:35 PM
#4
Hyperactive Member
Re: msgbox option
I dont know what you mean... Hope am right with this one.
VB Code:
Dim lnAns as Integer
lnAns = Msgbox ("Is this are you looking for?",vbYesNo + vbQuestion)
If lnAns = 7 'No
.....<process something>
Else
.....<process something>
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|