DefaultWorkspaceClone Method Example
The following example clones the default Workspace object, then lists the properties of each Workspace object.
Sub CloneWorkspace()
Dim wrkDefault As Workspace, wrkClone As Workspace
Dim prp As Property
On Error Resume Next
' Get default workspace.
Set wrkDefault = DBEngine.Workspaces(0)
' Clone default workspace.
Set wrkClone = Application.DefaultWorkspaceClone
' Enumerate properties of each workspace.
For Each prp In wrkDefault.Properties
Debug.Print ">>>"; prp.Name; " "; prp.Value
Next prp
For Each prp In wrkClone.Properties
Debug.Print ">>>"; prp.Name; " "; prp.Value
Next prp
End Sub