View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default VBA doesn't like sharing a spreadsheet

We are the 'Help' <vbg

BTW this

If Workbooks(thissheet).MultiUserEditing = False Then'

can be shortened as you are doing a logivcl test, which can only evaluate to
True or false, so you can write

If Not Workbooks(thissheet).MultiUserEditing = Then

Bob

"ortp01" wrote in
message ...

Wonderful !! I've had to change the syntax slightly to something
like...

thissheet = ActiveWorkbook.Name
If Workbooks(thissheet).MultiUserEditing = False Then' <<<<<<<<<<
strprompt = "False : ie not shared" & vbCrLf
varReturn = MsgBox(strprompt, vbOKOnly, strTitle)
Else
strprompt = "True: ie it's shared !" & vbCrLf
varReturn = MsgBox(strprompt, vbOKOnly, strTitle)
End If

Thank you ever so much. I would not have stumbled over this syntax and
the 'Help' was unhelpful. So your help is much appreciated !

Peter



Bob Phillips Wrote:
Try

Debug.Print Workbooks("myBook.xls").MultiUserEditing

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"ortp01" wrote
in
message ...

I'm sharing a spreadsheet on a network so some of the functionality

of
my VBA code is not available. I'm therefore trying to write some

code
to do one thing if it's shared, do another if it's stand-alone. Is
there therefore any way of determining within VBA whether a file is
shared or not ?


--
ortp01

------------------------------------------------------------------------
ortp01's Profile:

http://www.excelforum.com/member.php...o&userid=33689
View this thread:

http://www.excelforum.com/showthread...hreadid=534990



--
ortp01
------------------------------------------------------------------------
ortp01's Profile:

http://www.excelforum.com/member.php...o&userid=33689
View this thread: http://www.excelforum.com/showthread...hreadid=534990