Share/Unshare Workbook

GGIO

Board Regular
Joined
Jan 24, 2008
Messages
68
Hi all,

I'm looking for a code that will share/unshare a workbook.

Thanks in advance,
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Sorry, that code does not exist.

It's one of several things that just cannot be done to a shared workbook with Code.
And it's why many people prefer to use Access instead of Excel for Multiple User Data Entry.
 
Upvote 0
I am not sure why JONMO posted that.

It is quite easy - to unshare workbook, put:

ThisWorkbook.ExclusiveAccess

to re-share it, use

ThisWorkbook.SaveAs ThisWorkbook.FullName, xlaccess:=xlshared
 
Upvote 0
I am not sure why JONMO posted that.

It is quite easy - to unshare workbook, put:

ThisWorkbook.ExclusiveAccess

to re-share it, use

ThisWorkbook.SaveAs ThisWorkbook.FullName, xlaccess:=xlshared

We all put up howlers every now and then...observe my Avatar....lol
I was just glad that someone gave the correct answer.
 
Upvote 0
true dat' :)

didn't mean to be rude, was just surprised since I am usually always the one asking the questions (not able to help people much) and I was like hey - could it be?? :LOL:
 
Upvote 0
Not that it matters, but that post was 2 years prior to being voted in as an MVP.
So I was still in the learning stages...
 
Upvote 0

Forum statistics

Threads
1,216,588
Messages
6,131,589
Members
449,657
Latest member
Timber5

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top