VBA Excel 2000 - Remove Sharing

Posted on 2011-03-25
Last Modified: 2012-05-11
Dear Experts,

I would like to remove share by VBA code, so the same which would be done through menu Tools/Share Workbook and removing the flag in section "All changes by more than one user..."

The macro record would do this with a single line


but the problem it brings error message if the file is not shared originally.

Could you please advise how a check could be before this line whether the workbook is shared or not?

Question by:csehz
  • 2
LVL 30

Assisted Solution

SiddharthRout earned 500 total points
ID: 35214173
The simplest way to do it is

On Error Resume Next
On Error GoTo 0

LVL 30

Accepted Solution

SiddharthRout earned 500 total points
ID: 35214186
If you want to do a proper check then use this

If ActiveWorkbook.MultiUserEditing Then
End If

Open in new window


Author Closing Comment

ID: 35214199
Sid thanks very much for both

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Highlighting cells in Excel 9 17
Excel case statements 3 25
Excel 2010 Text Formatting placing a hyphen in front of text 3 20
Mac Excel column treating text as date 2 32
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

30 Experts available now in Live!

Get 1:1 Help Now