473,624 Members | 2,565 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

howto check if somebody allready opened a file (in a network)

Hi There,

my vb app can open files. Well, actually my vb app launches word or excell
to open them.
These files are shared in a network.

If somebody else has allready opened that file, you must get a requester
that says the file is temporarily unavaillable because it is edited somewere
else.

How do you test if somebody has allready opened that file?

I'll check this group regular basis......

Best regards,

Martijn

Jul 17 '05 #1
2 8271
Try:

Obtaining Open File Information from Another Machine
Use NetFileEnum to return a listing of open files and owners on remote
machines.
http://vbnet.mvps.org/code/network/netfileenum.htm

Note however this method is valid only on Windows NT4 / Windows 2000 /
Windows XP or later.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"martijn" <ma**********@w anadoo.nl> wrote in message
news:40******** *************** @news.wanadoo.n l...
: Hi There,
:
: my vb app can open files. Well, actually my vb app launches word or excell
: to open them.
: These files are shared in a network.
:
: If somebody else has allready opened that file, you must get a requester
: that says the file is temporarily unavaillable because it is edited
somewere
: else.
:
: How do you test if somebody has allready opened that file?
:
: I'll check this group regular basis......
:
: Best regards,
:
: Martijn
:
:
:

Jul 17 '05 #2
gonna try it, will let the group know... thanks!!

"Randy Birch" <rg************ @mvps.org> schreef in bericht
news:6I******** *******@news04. bloor.is.net.ca ble.rogers.com. ..
Try:

Obtaining Open File Information from Another Machine
Use NetFileEnum to return a listing of open files and owners on remote
machines.
http://vbnet.mvps.org/code/network/netfileenum.htm

Note however this method is valid only on Windows NT4 / Windows 2000 /
Windows XP or later.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"martijn" <ma**********@w anadoo.nl> wrote in message
news:40******** *************** @news.wanadoo.n l...
: Hi There,
:
: my vb app can open files. Well, actually my vb app launches word or excell : to open them.
: These files are shared in a network.
:
: If somebody else has allready opened that file, you must get a requester
: that says the file is temporarily unavaillable because it is edited
somewere
: else.
:
: How do you test if somebody has allready opened that file?
:
: I'll check this group regular basis......
:
: Best regards,
:
: Martijn
:
:
:

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6685
by: TJRobertsJob | last post by:
Was wondering if someone could help. Over the last month I've been developing a small database application, using Access 2000, for use in a friends shop. Everything was going well until about a week ago when I started getting the following error when I would click any buttons on my main form that ran either VB code or an Access Macro: "Error accessing file. Network connection may have been lost.". I know for sure it's not a network...
3
7586
by: Pete Atkins | last post by:
Help!!!!!!!! This may have been posted bfore, but i cannot find it. Have written a db in access 2003, opened in access 2000, saved, re-opened,etc - all was fine. Added some new forms / reports, again saved and reopened - all was working fine.
0
806
by: Li Pang | last post by:
Hi Anybody knows how to check a pre-opened ie browser is alive and how to activate or close it Thanks in advance
4
3747
by: Omko H | last post by:
I am trying to open %windir%\pfirewall.log. and I just can't get it to work (I am a absolute newbie to VB.net) the strange thing is that notepad is perfectly able to view the file. but my code keeps failing. amongst other things i tried: Dim s2 As New System.IO.FileStream(FileName, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read)
3
1954
by: dmitrey | last post by:
hi all, howto check is object Arg1 - a func, lambda-func - something else? I tried callable(Arg1), but callable(lambda-func) returnes False Thx, D.
8
3750
by: dmitrey | last post by:
howto check does module 'asdf' exist (is available for import) or no? (without try/cache of course) Thx in advance, D.
0
1109
neo008
by: neo008 | last post by:
Hi all, What if somebody deletes database file (.mdb)? Can I prevent? NE☼
0
1903
by: hidara | last post by:
I have an excel file that I need to check if its in use by another before i open it. I have found various forms of the follwing code but each one give me the same errors at the following 2 lines when I compile it using vb.net 2005 express (1) Open strFileSpec For Input Lock Read As intFn 'error = open not declared, missing comma etc. (2) Close(intFn) 'error = to...
1
1589
by: dmitrey | last post by:
hi all, howto check is function capable of obtaining **kwargs? i.e. I have some funcs like def myfunc(a,b,c,...):... some like def myfunc(a,b,c,...,*args):... some like
0
8633
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8348
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8493
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4187
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2613
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1797
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1493
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.