+ Reply to Thread
Results 1 to 2 of 2

What replaced the SharedWorkSpace Object?

  1. #1
    Registered User
    Join Date
    07-16-2010
    Location
    Bothell, Washington, USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    What replaced the SharedWorkSpace Object?

    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

  2. #2
    Registered User
    Join Date
    07-16-2010
    Location
    Bothell, Washington, USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: What replaced the SharedWorkSpace Object?

    No one knows the answer? How about a recommendation of where else to inquire? Anyone?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1