Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listing Username from a read only file

Status
Not open for further replies.

saltir

Programmer
Oct 14, 2009
13
0
0
MT
Hi,

I am using access to open an excel sheet on a server, so whenever another user is using this sheet the file is opened as read only. Is there a way in access to show who is the user using the excel sheet.?
Set appexcel = CreateObject("Excel.Application")
Set wbexcel = appexcel.Workbooks.Open("C:\Documents and Settings\saltir\Desktop\workorder_log.xls")
Set asheet = wbexcel.Sheets("Sheet1")

If ActiveWorkbook.ReadOnly Then
aactiveworkbook.close
End If


Thanks a lot for all your support :)


 

Hi,

Check out the WriteReseredBy property.

Why did you CHANGE from using the workbook reference you set, to activeworkbook???
Code:
If wbexcel.ReadOnly Then
   wbexcel.close 
End If




Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top