<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>UC&#039;s Corner &#187; file in use</title>
	<atom:link href="http://yussi.nl/index.php/tag/file-in-use/feed" rel="self" type="application/rss+xml" />
	<link>http://yussi.nl</link>
	<description>Yussi Ariefiyono</description>
	<lastBuildDate>Fri, 24 Jun 2011 13:08:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>File in use Vb</title>
		<link>http://yussi.nl/index.php/file-in-use-vb.html</link>
		<comments>http://yussi.nl/index.php/file-in-use-vb.html#comments</comments>
		<pubDate>Tue, 20 Apr 2010 07:11:36 +0000</pubDate>
		<dc:creator>yussi ariefiyono</dc:creator>
				<category><![CDATA[vb]]></category>
		<category><![CDATA[file in use]]></category>
		<category><![CDATA[username]]></category>
		<category><![CDATA[vba]]></category>

		<guid isPermaLink="false">http://yussi.nl/?p=105</guid>
		<description><![CDATA[just found nice code in internet, and i use it in one of my project. works great! it will return the last user that open the file Function LastUser(strPath As String) As String &#8216;// Code by Helen from http://www.xtremevbtalk.com/index.php?s= &#8216;// This routine gets the Username of the File In Use &#8216;// Credit goes to Helen]]></description>
			<content:encoded><![CDATA[<p>just found nice code in internet, and i use it in one of my project. works great!<br />
it will return the last user that open the file</p>
<blockquote><p>Function LastUser(strPath As String)  As String</p>
<p>&#8216;// Code by Helen from  http://www.xtremevbtalk.com/index.php?s=</p>
<p>&#8216;// This routine gets the Username  of the File In Use</p>
<p>&#8216;// Credit goes to Helen for code  &amp; Mike for the idea</p>
<p>&#8216;// Amendment 25th June  2004</p>
<p>&#8216;// : Name changes will show old  setting</p>
<p>&#8216;// : you need to get the Len of the  Name store just before</p>
<p>&#8216;// : the double Padded  nullstrings</p>
<p>Dim text As  String</p>
<p>Dim strFlag1 As String, strflag2 As  String</p>
<p>Dim i As Integer, j As  Integer</p>
<p>Dim hdlFile As  Long</p>
<p>Dim lNameLen As  Byte</p>
<p>strFlag1 = Chr(0) &amp;  Chr(0)</p>
<p>strflag2 = Chr(32) &amp;  Chr(32)</p>
<p>hdlFile =  FreeFile</p>
<p>Open strPath For Binary As  #hdlFile</p>
<p>text =  Space(LOF(hdlFile))</p>
<p>Get 1, ,  text</p>
<p>Close  #hdlFile</p>
<p>j = InStr(1, text,  strflag2)</p>
<p>i = InStrRev(text, strFlag1, j) +  Len(strFlag1)</p>
<p>lNameLen = Asc(Mid(text, i &#8211; 3,  1))</p>
<p>LastUser = Mid(text, i,  lNameLen)</p>
<p><span style="font-family: Arial; font-size: x-small;">End  Function</span></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://yussi.nl/index.php/file-in-use-vb.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

