Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Is there a way to find out who has an excel workbook open? I know this can be
done with Access. Can it also be done with Excel? workstation, username, environ name, etc. Any one of these would be acceptable. Thanks for any help! -- Stephen |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Looks like a solution that you could adapt (it's got a particular file hard
coded into it, but that is relatively easy to alter). http://www.xcelfiles.com/IsFileOpen.html#anchor_37 "Stephen sjw_ost" wrote: Is there a way to find out who has an excel workbook open? I know this can be done with Access. Can it also be done with Excel? workstation, username, environ name, etc. Any one of these would be acceptable. Thanks for any help! -- Stephen |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
As a matter of fact, here's the change to the one routine that would allow
you to browse for a file and determine if it is open, and if it is, by whom. Of course you still need the rest of the code on that website. Sub TestVBA() '// browse for file Dim strFileToOpen As String strFileToOpen = Application.GetOpenFilename() If Trim(UCase(strFileToOpen)) = "FALSE" Then Exit Sub ' user cancelled End If If IsFileOpen(strFileToOpen) Then MsgBox strFileToOpen & " is already Open" & _ vbCrLf & "By " & LastUser(strFileToOpen), _ vbInformation, "File in Use" Else MsgBox strFileToOpen & " is not open", vbInformation End If End Sub "Stephen sjw_ost" wrote: Is there a way to find out who has an excel workbook open? I know this can be done with Access. Can it also be done with Excel? workstation, username, environ name, etc. Any one of these would be acceptable. Thanks for any help! -- Stephen |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This is perfect! Thank you!
-- Stephen "JLatham" wrote: As a matter of fact, here's the change to the one routine that would allow you to browse for a file and determine if it is open, and if it is, by whom. Of course you still need the rest of the code on that website. Sub TestVBA() '// browse for file Dim strFileToOpen As String strFileToOpen = Application.GetOpenFilename() If Trim(UCase(strFileToOpen)) = "FALSE" Then Exit Sub ' user cancelled End If If IsFileOpen(strFileToOpen) Then MsgBox strFileToOpen & " is already Open" & _ vbCrLf & "By " & LastUser(strFileToOpen), _ vbInformation, "File in Use" Else MsgBox strFileToOpen & " is not open", vbInformation End If End Sub "Stephen sjw_ost" wrote: Is there a way to find out who has an excel workbook open? I know this can be done with Access. Can it also be done with Excel? workstation, username, environ name, etc. Any one of these would be acceptable. Thanks for any help! -- Stephen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i open a data workbook when i open a timesheet workbook | Excel Discussion (Misc queries) | |||
excel 2003 saved file will not open without a blank workbook open | Excel Discussion (Misc queries) | |||
Need VB code for workbook open to open a link | Excel Discussion (Misc queries) | |||
Search open sheets in workbook and insert into open sheet | Excel Discussion (Misc queries) | |||
Excel workbook does not open in open window on desktop | Excel Discussion (Misc queries) |