Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Excel shared file

Is there any way to getting a list (with the help of VBA) of who is
opening an excel shared file ?


Thank you
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default Excel shared file

Hi Gabriel;

Private Sub UsersList()
Dim users, msg As String, status As String
users = ThisWorkbook.UserStatus
For Row = 1 To UBound(users, 1)
msg = msg & users(Row, 1) & " " & Format(users(Row, 2), "dd/mm/yy h:mm")
& " "
If users(Row, 3) = 1 Then status = "(Exclusive mode)" Else status =
"(Shared mode)"
msg = msg & status & vbLf
Next
MsgBox msg, 64
End Sub

MP

"Gabriel" a écrit dans le message de
om...
Is there any way to getting a list (with the help of VBA) of who is
opening an excel shared file ?


Thank you



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel shared file

Michel ... UserStatus property is the good one but unfortunately is not useful if you have to open the file as read-only. So back to square one: if you want to trap an error (e.g. trying to save a file that is already open by someone else) you have to use something else and I don't know what to do

----- Michel Pierron wrote: ----

Hi Gabriel

Private Sub UsersList(
Dim users, msg As String, status As Strin
users = ThisWorkbook.UserStatu
For Row = 1 To UBound(users, 1
msg = msg & users(Row, 1) & " " & Format(users(Row, 2), "dd/mm/yy h:mm"
& "
If users(Row, 3) = 1 Then status = "(Exclusive mode)" Else status
"(Shared mode)
msg = msg & status & vbL
Nex
MsgBox msg, 6
End Su

M

"Gabriel" a écrit dans le message d
om..
Is there any way to getting a list (with the help of VBA) of who i
opening an excel shared file
Thank yo




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
Excel Shared File fi.or.jp.de Excel Discussion (Misc queries) 3 March 19th 11 08:27 PM
Shared Excel File jkcates Excel Worksheet Functions 1 April 24th 10 12:29 AM
rename shared Excel file Marge Excel Discussion (Misc queries) 3 November 3rd 08 05:39 PM
shared excel file Maileen Excel Discussion (Misc queries) 1 September 20th 05 01:54 PM
Shared Excel file Peter Sturm Excel Discussion (Misc queries) 0 April 28th 05 12:23 AM


All times are GMT +1. The time now is 01:13 AM.

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

About Us

"It's about Microsoft Excel"