Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro to print sheets from wrkbk only if data has been typed in | Excel Discussion (Misc queries) | |||
can I assign tasks/reminders to others in shared excel wrkbk? | Excel Discussion (Misc queries) | |||
How do I copy formulas from 1 wrkbk to another w/o absolute refs | Excel Discussion (Misc queries) | |||
view 2 different worksheets within the Wrkbk | Excel Worksheet Functions | |||
Copy columns to free space in diff wrkbk | Excel Programming |