Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is workbook open on the network?

I have a LAN network. I want a command that says if the workbook i
open on another PC by another user then msgbox("Already open") els
open it as normal.

Any ideas

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Is workbook open on the network?

It's already part of the kit Uncle Bill supplies. If the workbook isn't open
elsewhere it will open as normal. If someone else has it open a warning
dialog will open allowing the user to open it as read-only, be notified when
it's available or not to open it.

--
Regards
Andy Wiggins
www.BygSoftware.com
Home of "Save and BackUp",
"The Excel Auditor" and "Byg Tools for VBA"



"ianripping " wrote in message
...
I have a LAN network. I want a command that says if the workbook is
open on another PC by another user then msgbox("Already open") else
open it as normal.

Any ideas?


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is workbook open on the network?

Yes, but instead of that message appearing, I want it to just not ope
then workbook

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Is workbook open on the network?

Hi ianripping,
You can use:
Private Sub Workbook_Open()
If ThisWorkbook.ReadOnly Then ThisWorkbook.Close False
End Sub

MP

"ianripping " a écrit dans le message
de ...
I have a LAN network. I want a command that says if the workbook is
open on another PC by another user then msgbox("Already open") else
open it as normal.

Any ideas?


---
Message posted from http://www.ExcelForum.com/



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Is workbook open on the network?

Ian,

This function will test it, but it does open it to find out

Function IsNetworkOpen(filename As String)
Dim nFile As Long

IsNetworkOpen = False

nFile = FreeFile()
On Error Resume Next
Open filename For Input Lock Read Write As #nFile
If Err < 0 Then
If Err.Number = 70 Then
IsNetworkOpen = True
Else
IsNetworkOpen = "No such file"
End If
End If
On Error GoTo 0
Close #nFile

End Function



--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"ianripping " wrote in message
...
Yes, but instead of that message appearing, I want it to just not open
then workbook.


---
Message posted from http://www.ExcelForum.com/





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is workbook open on the network?

Ok, Michelle yours doesnt work. Bob - how do I use yours?


---
Message posted from http://www.ExcelForum.com/

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is workbook open on the network?

Ok, Michelle yours doesnt work. Bob - how do I use yours

--
Message posted from http://www.ExcelForum.com

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is workbook open on the network?

Michell I got yours to work.

Is there any way of reporting the network pc where the file is open

--
Message posted from http://www.ExcelForum.com

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
XL2007 - Can't open a file that is in use on the network PCLIVE Excel Discussion (Misc queries) 0 February 4th 09 07:30 PM
Excel can't open network drive! Meneos Excel Discussion (Misc queries) 3 September 5th 08 12:43 PM
on network, pc a & pc b share pc x only open [read only] ipcvb Setting up and Configuration of Excel 1 October 7th 05 12:15 AM
Is workbook open anywhere in network? Miochael Bond Excel Programming 13 September 22nd 04 04:15 PM
open excll from network aneurin Excel Programming 3 December 18th 03 02:33 PM


All times are GMT +1. The time now is 08:46 PM.

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"