Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Wrkbk already open by whom?


Hi friends,

As some one told me here, Iam using "Error manipulation" to know whe
an specific workBk is already open, and works cool.

Question: Is there any way to know the Loggin name of the user usin
that workBk?

Thanks in advance,
Aldo.

This is the code to know if the file is already open:

Function CheckOrFileOpen(strFilename As String)
'This function checks to see if a file is open or not.
Dim intFile As Integer, intErrorNummer As Integer
On Error Resume Next
intFile = FreeFile()
' Attempt to open the file and lock it.
Open strFilename For Input Lock Read As #intFile
Close intFile
intErrorNummer = Err.Number
On Error GoTo 0
'Check to see which error occurred.
Select Case intErrorNummer
Case 0
CheckOrFileOpen = False
Case 70
CheckOrFileOpen = True
Case Else
Error intErrorNummer
End Select
End Functio

--
ajliak
-----------------------------------------------------------------------
ajliaks's Profile: http://www.excelforum.com/member.php...nfo&userid=819
View this thread: http://www.excelforum.com/showthread.php?threadid=39805

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
macro to print sheets from wrkbk only if data has been typed in Brian Excel Discussion (Misc queries) 3 February 16th 08 02:19 PM
can I assign tasks/reminders to others in shared excel wrkbk? Karen Excel Discussion (Misc queries) 1 November 29th 07 11:06 PM
How do I copy formulas from 1 wrkbk to another w/o absolute refs Mike Excel Discussion (Misc queries) 1 September 25th 06 04:48 PM
view 2 different worksheets within the Wrkbk tfall Excel Worksheet Functions 7 July 18th 06 04:25 PM
Copy columns to free space in diff wrkbk Craigm[_6_] Excel Programming 4 June 21st 05 03:58 PM


All times are GMT +1. The time now is 11:17 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"