Sub Create_DesignMaster(dbName As String, strPath As String)
Dim repDesignMaster As New JRO.Replica
Dim myFileSystemObject As Scripting.FileSystemObject
Dim strDb As String
Set myFileSystemObject = New FileSystemObject
strDb = strPath & "DM_" & dbName
If Not myFileSystemObject.FileExists(strDb) Then
myFileSystemObject.CopyFile strPath & dbName, strDb
Else
Debug.Print "The " & strDb & " database file already exists."
Exit Sub
End If
repDesignMaster.MakeReplicable strDb, True
Set repDesignMaster = Nothing
Set myFileSystemObject = Nothing
End Sub
|