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

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
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?? :laugh:
 
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,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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