Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA doesn't like sharing a spreadsheet
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA doesn't like sharing a spreadsheet
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA doesn't like sharing a spreadsheet
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sharing Excel Spreadsheet | Excel Discussion (Misc queries) | |||
Spreadsheet sharing and VBA | Excel Programming | |||
sharing data between sheets in a spreadsheet | Excel Discussion (Misc queries) | |||
sharing a spreadsheet on a network drive | Excel Discussion (Misc queries) | |||
Refreshing / sharing an Excel spreadsheet | Excel Programming |