Bullsandbears123
Technical User
I'm using the following code except I would like the msgbox to auto select the "no" button after 10 seconds. How can I do this. THANKS!!
Function checkfile()
Dim path
path = "R:\week\week_2003627_A.pdf"
If Dir(path) <> "" Then
Dim msg As String
Dim response As String
msg = "File" & path & "already exists" & vbCrLf & "Do you want to overwrite?"
response = MsgBox(msg, vbYesNo, "FILE EXISTS!"
If response = vbYes Then
'do somthing
MsgBox ("YES"
Else 'vbNO
'do somthine else
MsgBox ("no"
End If
End If
End Function
Function checkfile()
Dim path
path = "R:\week\week_2003627_A.pdf"
If Dir(path) <> "" Then
Dim msg As String
Dim response As String
msg = "File" & path & "already exists" & vbCrLf & "Do you want to overwrite?"
response = MsgBox(msg, vbYesNo, "FILE EXISTS!"
If response = vbYes Then
'do somthing
MsgBox ("YES"
Else 'vbNO
'do somthine else
MsgBox ("no"
End If
End If
End Function