<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Importing VBS Files In Your VBScript Project</title>
	<atom:link href="http://gazeek.com/coding/importing-vbs-files-in-your-vbscript-project/feed/" rel="self" type="application/rss+xml" />
	<link>http://gazeek.com/coding/importing-vbs-files-in-your-vbscript-project/</link>
	<description>Geeks Blog .. Cos Others Just Dont Understand</description>
	<lastBuildDate>Wed, 21 Jul 2010 07:11:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: GroLis</title>
		<link>http://gazeek.com/coding/importing-vbs-files-in-your-vbscript-project/comment-page-1/#comment-74</link>
		<dc:creator>GroLis</dc:creator>
		<pubDate>Wed, 24 Feb 2010 08:56:38 +0000</pubDate>
		<guid isPermaLink="false">http://gazeek.com/?p=61#comment-74</guid>
		<description>Hello! I have a problem with your function. I get an &quot;File not found&quot; error, when I run my script with this function.

Here is my code:
Sub Import(strFile)
	Dim WshShell : Set WshShell = WScript.CreateObject(&quot;WScript.Shell&quot;)
	Dim objFs 	 : Set objFs = CreateObject(&quot;Scripting.FileSystemObject&quot;)
	
	strFile = WshShell.ExpandEnvironmentStrings(strFile)
	strFile = objFs.GetAbsolutePathName(strFile)
	
	Dim objFile : Set objFile = objFs.OpenTextFile(strFile)
	
	strCode = objFile.ReadAll
	objFile.Close
	ExecuteGlobal strCode
End Sub

Do you have an idea, what the error is? I import a file with Import &quot;Common.vbs&quot;. The file is in the same folder as the running script.
Thanky you for your help. :)</description>
		<content:encoded><![CDATA[<p>Hello! I have a problem with your function. I get an &#8220;File not found&#8221; error, when I run my script with this function.</p>
<p>Here is my code:<br />
Sub Import(strFile)<br />
	Dim WshShell : Set WshShell = WScript.CreateObject(&#8220;WScript.Shell&#8221;)<br />
	Dim objFs 	 : Set objFs = CreateObject(&#8220;Scripting.FileSystemObject&#8221;)</p>
<p>	strFile = WshShell.ExpandEnvironmentStrings(strFile)<br />
	strFile = objFs.GetAbsolutePathName(strFile)</p>
<p>	Dim objFile : Set objFile = objFs.OpenTextFile(strFile)</p>
<p>	strCode = objFile.ReadAll<br />
	objFile.Close<br />
	ExecuteGlobal strCode<br />
End Sub</p>
<p>Do you have an idea, what the error is? I import a file with Import &#8220;Common.vbs&#8221;. The file is in the same folder as the running script.<br />
Thanky you for your help. <img src='http://gazeek.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank</title>
		<link>http://gazeek.com/coding/importing-vbs-files-in-your-vbscript-project/comment-page-1/#comment-15</link>
		<dc:creator>Frank</dc:creator>
		<pubDate>Sat, 27 Dec 2008 02:13:24 +0000</pubDate>
		<guid isPermaLink="false">http://gazeek.com/?p=61#comment-15</guid>
		<description>That is exactly what I am looking.  I was about to learn perl so that I could have the same functionality.  If it works without any hiccups, you will have saved me hours and hours of work.

Thanks!!!</description>
		<content:encoded><![CDATA[<p>That is exactly what I am looking.  I was about to learn perl so that I could have the same functionality.  If it works without any hiccups, you will have saved me hours and hours of work.</p>
<p>Thanks!!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
