B
Bill
In the sub below, I need something after the
"copyfolder" that will cause the code to wait
until the copy is completed or otherwise raises
an error condition. In the past I've used
ShellWait to invoke exe's outside of VBA,
but I don't see how that would apply to this
case.
Any suggestions?
Thanks,
Bill
=======================================
Private Sub cmdBkupDB_Click()
Dim fs As Object
On Error GoTo ErrHandler
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFolder "c:\Recipies", "d:\Recipies"
Me.tbRecipeName.SetFocus
MsgBox "Recipies database backed up successfully"
ExitHandler:
Set fs = Nothing
Exit Sub
ErrHandler:
MsgBox "Error Encountered while backing up Recipies database: " &
vbNewLine & _
"Error number = " & Err.Number & " - " & Err.Description & vbCrLf
Resume ExitHandler
End Sub
======================================
"copyfolder" that will cause the code to wait
until the copy is completed or otherwise raises
an error condition. In the past I've used
ShellWait to invoke exe's outside of VBA,
but I don't see how that would apply to this
case.
Any suggestions?
Thanks,
Bill
=======================================
Private Sub cmdBkupDB_Click()
Dim fs As Object
On Error GoTo ErrHandler
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFolder "c:\Recipies", "d:\Recipies"
Me.tbRecipeName.SetFocus
MsgBox "Recipies database backed up successfully"
ExitHandler:
Set fs = Nothing
Exit Sub
ErrHandler:
MsgBox "Error Encountered while backing up Recipies database: " &
vbNewLine & _
"Error number = " & Err.Number & " - " & Err.Description & vbCrLf
Resume ExitHandler
End Sub
======================================