• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Run time error in the shared workbook

vlavan08

New Member
hi,


I tried to copy the values from different sheets and paste it and added the values in a separate protected sheet of the same workbook.


macro is working well if the workbook is unshared. if i shared the workbook, it is not working.


can you help me, pls?
 
Hi,


I expect the problem is that you can't unprotect a sheet if the workbook is shared.


Hope that helps...

Colin
 
you must first 'unshare' the workbook.


Application.DisplayAlerts = False ' get rid of sharing prompt

If ActiveWorkbook.MultiUserEditing Then 'if shared then

ActiveWorkbook.ExclusiveAccess 'don't share

End If

'reshare when you save

ActiveWorkbook.SaveAs FileName, , , , , , xlShared

'hope that helps.
 
Back
Top