Re: How to skip opening an already open file

Tech-Archive recommends: Fix windows errors by optimizing your registry



On 14 Feb., 11:58, Gary''s Student
<GarysStud...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
In that case I would let the server to the work. Consider a SharePoint or
similar technology. You would have the ability to lock a file for editting,
to permit read-only access, to view which users are accessing the file, etc..

There is probably a good reason that most of the universe has decided not to
instrument this functionality on the client side.

--
Gary's Student
gsnu200705



"HH" wrote:
On 14 Feb., 01:52, Gary''s Student
<GarysStud...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
This works for Excel. Perhaps you can adapt it:

Sub demo()
Dim IsItOpen As Boolean
IsItOpen = False
needopen = "Book3"
needopen2 = "Book3.xls"
For Each w In Workbooks
If w.Name = needopen Or w.Name = needopen2 Then
IsItOpen = True
End If
Next
If Not IsItOpen Then
Workbooks.Open Filename:= _
"C:\Documents and Settings\Owner\Desktop\Book3.xls"
End If
End Sub

--
Gary's Student
gsnu200705

"HH" wrote:
Hi'

I have a script that opens a serie of Project files then makes a
change and then closes the file.

The problem is that sometimes a file is already open (by some user)
and the script stops (And I get the question if I want to open as read-
only).

How do I make it skip the already open file and continues to the next
file?

Thanks!
HH- Skjul tekst i anførselstegn -

- Vis tekst i anførselstegn -

Hi'

Nice idea, but your script only test if the file already is opened on
your machine. My problem is that other users can open the file cross
the network.- Skjul tekst i anførselstegn -

- Vis tekst i anførselstegn -

Hi

Well only problem is that I have no SharePoint or similar technology.
I work on at low-tech solution until the company total solution is in
place. I work on an old-fasion file-server.

I just hopeded there would be at way to ask for the status for a file.

.



Relevant Pages

  • Re: How to skip opening an already open file
    ... Gary's Student ... If w.Name = needopen Or w.Name = needopen2 Then ... and the script stops (And I get the question if I want to open as read- ... HH- Skjul tekst i anførselstegn - ...
    (microsoft.public.office.developer.vba)
  • Re: How to skip opening an already open file
    ... Gary''s Student ... If w.Name = needopen Or w.Name = needopen2 Then ... HH- Skjul tekst i anførselstegn - ... Well only problem is that I have no SharePoint or similar technology. ...
    (microsoft.public.office.developer.vba)
  • Re: How to skip opening an already open file
    ... Gary's Student ... If w.Name = needopen Or w.Name = needopen2 Then ... HH- Skjul tekst i anførselstegn - ... Well only problem is that I have no SharePoint or similar technology. ...
    (microsoft.public.office.developer.vba)
  • Re: How to skip opening an already open file
    ... On 14 Feb., 01:52, Gary''s Student ... If w.Name = needopen Or w.Name = needopen2 Then ... and the script stops (And I get the question if I want to open as read- ... HH- Skjul tekst i anførselstegn - ...
    (microsoft.public.office.developer.vba)
  • [Full-Disclosure] Student faces suit over key to CD locks
    ... Thursday that it will likely sue a Princeton student who early this week ... site on Monday that gave detailed instructions on how to disarm the SunnComm ... technology, which aims to block unauthorized CD copying and MP3 ripping. ... violating copyright law that bans the distribution of tools for breaking ...
    (Full-Disclosure)