Events won't trigger if locked for edit and if opened from IE

M

Mechi1

I don't know if I'm at the right place because there is 3 MS products
involved Excel, IE and IIS. But throwing a Q here is a start.

The problem is that an Excel workbook we're working on, heavily dependent on
vba and events like onopen, onclose, onselection_change, etc., won't run ANY
user triggered events if the file is locked for editing by another user and
file is opened by a link on a local intranet site with IE... I'll take it
again


The workbook use macros and events to do several things like auto save and
close, and the code has a fail safe to avoid people from turning off macros
in Excel when opening it. The workbook is totally locked down if macros can't
run (unless you have the password ofc).
This workbook is then put on our intranet for everyone to use and edit,
though we only allow one user at a time. This is why we created an auto save
and close so people wont forget to close the wb and lock other users out.

Normally this works out quite well until the occasion when a user wants to
access the wb when it's already opened by another user. IF the user tries to
open the locked file through IE using the webpage provided hyperlink, no vba
events get triggered what so ever. Workbook_Open, Workbook_BeforeClose,
Workbook_BeforeSave, etc. But other macros can be executed so macros haven't
been deactivated. On the other hand if the user instead browses the file on
the server and opens it with Windows Explorer or in any other way, everything
works fine and events are fired like normal.

What are we doing wrong? Bug or settings?

Using: IE 6 and 7, Excel (Office) 2000, 2002 and 2007, IIS v?, XP pro...
 
G

Gary''s Student

If you are opening a file that is already opened by another user and is
"locked":

1. immediately save the wb to your local drive
2. close the file
3. quite Excel
4. open the local copy

Nothing is lost by doing this since you could not have save the file to the
shared drive anyway.
 
M

Mechi1

There supposed to be only one file where everyone could edit its content, to
some restrictions though, for everyone to see. Saving the file locally beats
the purpose of having the file.

The file is supposed to handle the fact that several users could have it
opened at the same time, just only one (first in) can edit its content at the
time.

I'm hoping to see the events triggering, either by changing some, for me,
unknown setting (fix) or a way to open the workbook through the webpage in
other ways than hyperlinks (workaround).
 
M

Mechi1

Just to clarify

The file is on a share, where it supposed to be, not saved locally. You
could see it as a booking file for resources. Everyone has read/write
privilege. The file is accesed from a webpage on our intranet which link to
the file on the share, nothing special.

This problem only occur when trying to open the file from the webpage and
the file is occupied by another user and thus is locked from editing.

It's only the worksheet events that is not working, all other events works
like normal, OnTime triggers, buttons OnClick, etc.

Application.EnableEvents is true btw (never used it in this wb but dbl
checked anyway).
 
M

Mechi1

Is there anyone that can even reproduce the problem?
I'm still having this problem and hope to find a solution to this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top