Who is in a network shared Excel file

  • Thread starter Carrie_Loos via OfficeKB.com
  • Start date
C

Carrie_Loos via OfficeKB.com

I retreived this code from a post and it works good as long as I am the one
who has it opened originally, but if someone else opens the file first, I
have a 'read only' copy and this code gives me an error. Is there a way to
modify this so I can see who has the Excel file open?

Sub UsersList()
Dim users, msg As String
users = Workbooks("Logistics Repair Time Log.xls").UserStatus
For Row = 1 To UBound(users, 1)
msg = msg & users(Row, 1)
Next
MsgBox msg, 64
End Sub
 
P

Peter T

That code works fine for me no matter who opened the shared workbook first.

But you mention 'read only', if the workbook is shared you shouldn't get
that. Are you sure it was saved as shared and all users are allowed to share
it. Check manually

In 97-3003, Tools, Share Workbook
In 2007, Review tab, Share Workbook

All users should be able to see the shared workbook in this dialog.

Regards,
Peter T
 
C

Carrie_Loos via OfficeKB.com

Thank you and you are right, I did not have it shared because it tells me I
cannot edit or view macros when the workbook is shared. That's why I wanted
to know who was in the workbook rather than making a shared workbook. Any
suggestions?


Peter said:
That code works fine for me no matter who opened the shared workbook first.

But you mention 'read only', if the workbook is shared you shouldn't get
that. Are you sure it was saved as shared and all users are allowed to share
it. Check manually

In 97-3003, Tools, Share Workbook
In 2007, Review tab, Share Workbook

All users should be able to see the shared workbook in this dialog.

Regards,
Peter T
I retreived this code from a post and it works good as long as I am the one
who has it opened originally, but if someone else opens the file first, I
[quoted text clipped - 9 lines]
MsgBox msg, 64
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top