Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Who has my workbook open?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default Who has my workbook open?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default Who has my workbook open?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Who has my workbook open?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i open a data workbook when i open a timesheet workbook [email protected] uk Excel Discussion (Misc queries) 2 January 4th 09 04:50 PM
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 04:24 PM
Need VB code for workbook open to open a link Daniel Baker Excel Discussion (Misc queries) 2 August 18th 06 01:30 AM
Search open sheets in workbook and insert into open sheet punx77 Excel Discussion (Misc queries) 0 March 6th 06 05:07 PM
Excel workbook does not open in open window on desktop DeanH Excel Discussion (Misc queries) 2 March 8th 05 09:51 AM


All times are GMT +1. The time now is 03:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"