Function OkToOverwrite(sFullName As String) As Boolean
Dim sMsg As String
Dim nButtons As Long
Dim nResponse As Long
Dim bOverwrite As Boolean
bOverwrite = False
sMsg = sFullName & " already exists. Do you want to overwrite it?"
nButtons = vbYesNoCancel + vbExclamation + vbDefaultButton2
nResponse = MsgBox(sMsg, nButtons, "Overwrite File?")
If nResponse = vbYes Then
bOverwrite = True
End If
OkToOverwrite = bOverwrite
End Function
|