Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is workbook open on network drive
Is there a way to tell if a workbook is open on a network drive? If someone
has this workbook open, there name will be in sheet1 range A1. Is there a statement that can tell me 1. if the workbook is open and 2. the name of the person who has it open (range A1)? i have played with referring to it as such, but am not sure of the rest of the code i should use. workbooks("\\servername\folder name\file name.xls") |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is workbook open on network drive
On Tue, 18 Mar 2008 07:16:00 -0700, Spencer Hutton
wrote: Is there a way to tell if a workbook is open on a network drive? If someone has this workbook open, there name will be in sheet1 range A1. Is there a statement that can tell me 1. if the workbook is open and 2. the name of the person who has it open (range A1)? i have played with referring to it as such, but am not sure of the rest of the code i should use. workbooks("\\servername\folder name\file name.xls") Open on your machine? This won't account for mapped drives, but it may give you a start Dim wb As Workbook On Error Resume Next Set wb = Workbooks("BackOrderReport.xls") On Error GoTo 0 If wb Is Nothing Then MsgBox "Workbook not open" Else If Left$(wb.Path, 2) = "\\" Then MsgBox "Workbook open on network drive by " & wb.Sheets(1).Range("a1").Value Else MsgBox "Workbook open locally" End If End If -- Dick Kusleika Microsoft MVP-Excel http://www.dailydoseofexcel.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel can't open network drive! | Excel Discussion (Misc queries) | |||
user cannot access his share workbook on network drive. | Excel Worksheet Functions | |||
Can't open excel on network drive, it said somebody has opened it | Excel Discussion (Misc queries) | |||
How do I open a file from a Network drive using Excel VBA? | Excel Programming | |||
Excel 2k3: Workbook on network drive, when save creates new file | Excel Discussion (Misc queries) |