Owner of an Excel file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Is there any way I can find out if a particular Excel file is open, and if
so who the user is?

Thanks,

Art
 
Art,

You can have a change here, however because that an Excel file can be used
multiuser, is my opinion that you have much more change to get an answer on
this question in one of the other very active newsgroups.

microsoft.public.excel.programming.

I hope this helps,

Cor
 
Well, I haven't tried this so I don't if the DSO
(http://support.microsoft.com/?id=224351) will help you with your particular
request, but give it a try as it is easy to work with. Otherwise one way of
detecting if a file is open, is to try an open it yourself and catch an
exception, if it is open. When an Excel file is open, a .tmp file is created
in your designated temp folder, which is usually located here: :\Documents
and Settings\<userName>\Local Settings\Temp.

The Office components might also provide you with information using
automation.
 
Cor,

Thanks -- as always I appreciate your taking the time to respond to a
question of mine. The reason I posted this question here is because I was
anticipating writing a VB.net project that will move some data to and from an
Excel file. Since multiple people will be using this project I wanted to
have a user friendly way to deal with more than one person trying to work
with the Excel file at a time.

Thanks again,

Art
 
CT,

Thanks for the info -- I don't know if it will help yet, but it looks
promising.

Art
 
Art,

That you find the solution in the excel newsgroup does not mean you would
not use it in VBNet. The goal is to find how and than to translate it to
VB.Net. To get a good answer in the excel programming newsgroup is much more
likely.

If you than have problems with the translation from the vba code to vbnet,
than you will probably easy be helped by somebody (if that is than still
needed)

Cor
 

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

Back
Top