I just upgraded to Office 2010 from Office 2007 and discovered that all my Excel VBA code that relied on the SharedWorkSpace object no longer works. The help file says it's been deprecated in 2010, but it doesn't tell me what to do instead. I have a lot of code that depends on the SharedWorkSpace object. For example, I have a subroutine that loops through all the files on my SharePoint Server (recently upgraded from 2007 to 2010 also) and flags all the files that are checked out. Is there some other way to do this in Excel 2010 without using the SharedWorkSpace object? Note, the help says that the SharedWorkSpace object has been maintained for backwards compatibility, but I'm assuming that's only so the code will compile. I can create a ShareWorkSpace object, but just about every property I tried to access fails. It worked great in Excel 2007.

Following is some sample code that used to work, but no longer works. I'd like to get something like it working. Note, this is just a copy/paste of the example code from the Excel VBA help file:

Sub SharedWorkspaceExample()
Dim swsWorkspace As Office.SharedWorkspace
Dim strSWSInfo As String
Set swsWorkspace = ActiveWorkbook.SharedWorkspace
'
' Code fails for every property in the next line of code.
'
strSWSInfo = swsWorkspace.Name & vbCrLf & _
" - URL: " & swsWorkspace.URL & vbCrLf & _
"The shared workspace contains " & vbCrLf & _
" - Files: " & swsWorkspace.Files.Count & vbCrLf & _
" - Folders: " & swsWorkspace.Folders.Count & vbCrLf & _
" - Links: " & swsWorkspace.Links.Count & vbCrLf & _
" - Members: " & swsWorkspace.Members.Count & vbCrLf & _
" - Tasks: " & swsWorkspace.Tasks.Count & vbCrLf


MsgBox strSWSInfo, vbInformation + vbOKOnly, _
"Shared Workspace Information"
Set swsWorkspace = Nothing
End Sub