Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to set up a workbook that can be shared by upto 3 users.
What i need to do is : 1) Check if Workbook exists then 2) Check if the Workbook is in use The path will be R:\Shared\Excel the Workbook name is EPLCDATA.xls I would like to display a message saying that The Workbook Exists / Doesn't Exist and then a message if the Workbook is already open. Any advice appreciated. Thanks in advance -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To check if the file exists:
dim myPath as string dim myFileName as string dim tstWkbk as workbook myfilename = "EPLCDATA.xls" mypath = "R:\Shared\Excel\" if dir(mypath & myfilename) = "" then msgbox "it ain't there else msgbox "yep, it's out there!" end if set tstwkbk = nothing on error resume next set tstwkbk = workbooks(myFilename) on error goto 0 if tstwkbk is nothing then msgbox "it ain't open" elseif lcase(tstwkbk.path) < lcase(mypath) then msgbox "something with that name is open--but not the right folder!" else msgbox "yep, it's open" end if "Jako <" wrote: I want to set up a workbook that can be shared by upto 3 users. What i need to do is : 1) Check if Workbook exists then 2) Check if the Workbook is in use The path will be R:\Shared\Excel the Workbook name is EPLCDATA.xls I would like to display a message saying that The Workbook Exists / Doesn't Exist and then a message if the Workbook is already open. Any advice appreciated. Thanks in advance. --- Message posted from http://www.ExcelForum.com/ -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
shared workbook is set up is not 'shared' on network | Excel Worksheet Functions | |||
shared workbook - shared workbook options grayed out | Excel Discussion (Misc queries) | |||
Shared Workbook | Excel Discussion (Misc queries) | |||
Printing viewing a shared workbook on a shared drive | Excel Discussion (Misc queries) | |||
update pivot in shared shared workbook | Excel Discussion (Misc queries) |