' Copy from_file to to_file, raising the
' Progress event periodically.
Public Sub CopyFile(ByVal from_file As String, ByVal _
to_file As String)
' If a download is underway, complain.
If Len(m_FromFile) > 0 Then
Err.Raise fc_CopyInProgress, _
"Copy already in progress"
' Do not copy if the file already exists.
If Len(Dir$(to_file)) > 0 Then
Err.Raise fc_FileExists, _
"File already exists"
' Save the from and to file names.
m_FromFile = from_file
m_ToFile = to_file
' Start the download.
AsyncRead from_file, vbAsyncTypeFile, _