+ Reply to Thread
Results 1 to 2 of 2

Sharing a Workbook

  1. #1
    Registered User
    Join Date
    03-02-2004
    Posts
    15

    Question Sharing a Workbook

    Hi,

    I am trying to write a macro in workbook A that will make workbook B a shared file.
    Does anyone know how to do this.

    Thanks
    Jennie

  2. #2
    Forum Contributor
    Join Date
    09-04-2006
    Location
    Yorkshire, England
    Posts
    267

    Sharing another workbook

    Hi

    I have a similar macro (Below) That shares book 2, However this overwrites the second workbook instead of making a copy of it and sharing the copy. So if you want to use the below macro make back up copys of your work and save them to a different location under a different name first as i dont know how well it will work on your work.



    Sub Book2Share()
    Application.ScreenUpdating = False 'Stops the screen flashing
    sTarget = "Book2" & ".xls" ' The name of your second workbook
    On Error Resume Next
    Workbooks.Open sTarget
    Windows(sTarget).Activate
    With ActiveWorkbook
    If Not ActiveWorkbook.MultiUserEditing Then ' Checks if your second book is already shared
    ActiveWorkbook.SaveAs Filename:=ActiveWorkbook.FullName, _
    accessMode:=xlShared
    End If
    Application.ScreenUpdating = True ' resumes screen updating
    End With
    End Sub


    Hope it works for you
    JR
    Versions
    Mac OS X 'Leopard'
    Mac MS Office Excel 2004
    Windows XP
    MS Excel 2002
    MS Excel 2003

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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