<?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"
	>

<channel>
	<title>VBA</title>
	<atom:link href="http://vba.info/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://vba.info</link>
	<description>Your source for information on VBA</description>
	<pubDate>Wed, 19 Nov 2008 21:45:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Writing to a Text File in VBA</title>
		<link>http://vba.info/?p=37</link>
		<comments>http://vba.info/?p=37#comments</comments>
		<pubDate>Mon, 10 Nov 2008 12:00:07 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[excel]]></category>

		<guid isPermaLink="false">http://vba.info/?p=37</guid>
		<description><![CDATA[I was recently working on a project where I needed to create a few lines of text based on the data in an Access database. I could have just written the data to a TextBox, but to save some cutting and pasting, I had the code write it directly to a file.
The method is easy [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently working on a project where I needed to create a few lines of text based on the data in an Access database. I could have just written the data to a TextBox, but to save some cutting and pasting, I had the code write it directly to a file.</p>
<p>The method is easy enough, if a bit obscure.  Unlike most of VBA, this is not done with a function call or through an object; it is done using a statement, the<strong> Print #</strong> statement.  The <strong>Print #</strong> statement goes back to the original BASIC compilers and their GOTOs, GOSUBs and line numbers.  I wrote code in BASIC using <strong>Print #</strong> 30 years ago.</p>
<p><span id="more-37"></span></p>
<p>First step is to open the file.  To do this, get a handle (an integer) to a file and use it to open the file for writing.</p>
<pre>    <em>FileHandle </em>= FreeFile()
    Open <em>Filename </em>For Output As <em><em>FileHandle </em></em></pre>
<p>Then write to the file with the print statement.</p>
<pre>     Print #<em>FileHandle PrintParamaters</em></pre>
<p>Then close the file.</p>
<pre>    <em>Close Filename</em></pre>
<p>There are other optional parameters for the Open &amp; Close functions, but these are sufficient for this case.  Here is a example subroutine that writes part of an Excel worksheet to a CSV (comma-separated value) file.</p>
<pre>Public Sub WriteToCSV()
    Dim fnum As Integer   
    Dim cell As Range   
    Dim outLine As String   
    Dim row As Integer   
    Dim col As Integer

    fnum = FreeFile()
    Open "C:\region.csv" For Output As fnum

    For row = 1 To 5
        outLine = ""
        For col = 1 To 5
            outLine = outLine &amp; Chr(34) &amp; Cells(row, col).Value &amp; Chr(34) &amp; ","
        Next col
        Print #fnum, Left(outLine, Len(outLine) - 1)
    Next row

    Close #fnum
End Sub</pre>
]]></content:encoded>
			<wfw:commentRss>http://vba.info/?feed=rss2&amp;p=37</wfw:commentRss>
		</item>
		<item>
		<title>Free Programming E-Books From Microsoft</title>
		<link>http://vba.info/?p=29</link>
		<comments>http://vba.info/?p=29#comments</comments>
		<pubDate>Mon, 03 Nov 2008 12:00:04 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
		
		<category><![CDATA[Documentation]]></category>

		<category><![CDATA[free]]></category>

		<category><![CDATA[microsoft]]></category>

		<category><![CDATA[reference]]></category>

		<guid isPermaLink="false">http://vba.info/?p=29</guid>
		<description><![CDATA[Microsoft is offering some free programming e-books.  They aren&#8217;t on VBA, but they will be useful to people who also program in other languages.  You can download sample chapters directly, but to get the entire contents of the books, you must sign-up for the Microsoft&#8217;s &#8220;Book  Connection Newsletter.&#8221;
Introducing Microsoft SQL Server 2008
Learn about major [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft is offering some free programming e-books.  They aren&#8217;t on VBA, but they will be useful to people who also program in other languages.  You can download sample chapters directly, but to get the entire contents of the books, you must sign-up for the <span class="BCN">Microsoft&#8217;s &#8220;Book  Connection Newsletter.&#8221;</span></p>
<h3><a href="http://csna01.libredigital.com/?urss1q2we6" target="_blank">Introducing Microsoft SQL Server 2008</a></h3>
<p class="PreviewText">Learn about major new features in SQL Server 2008 including  security, administration, and performance.</p>
<ul>
<li>Chapter 1:  Security and Administration</li>
<li>Chapter 2: Performance</li>
<li>Chapter 3: Type  System</li>
<li>Chapter 4: Programmability</li>
<li>Chapter 5: Storage</li>
<li>Chapter 6:  Enhancements for High Availability</li>
<li>Chapter 7: Business Intelligence  Enhancements</li>
</ul>
<p class="PreviewText">
<h3><a href="csna01.libredigital.com/?urvs5cn3s8" target="_blank">Visual Studio Related: LINQ, ASP,NET and Silverlight<br />
</a></h3>
<p>There are three books available on this page:</p>
<ul>
<li> Programming Microsoft LINQ</li>
<li> Programming Microsoft® ASP.NET 3.5</li>
<li> Introducing Microsoft Silverlight 2</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://vba.info/?feed=rss2&amp;p=29</wfw:commentRss>
		</item>
		<item>
		<title>Free Office 2007 VBA References</title>
		<link>http://vba.info/?p=14</link>
		<comments>http://vba.info/?p=14#comments</comments>
		<pubDate>Mon, 27 Oct 2008 14:00:34 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
		
		<category><![CDATA[Documentation]]></category>

		<category><![CDATA[free]]></category>

		<category><![CDATA[microsoft]]></category>

		<category><![CDATA[office]]></category>

		<category><![CDATA[reference]]></category>

		<guid isPermaLink="false">http://vba.info/?p=14</guid>
		<description><![CDATA[I mentioned last week that Microsoft has VBA reference guides available for download for Office 2003.  They also have free references guides for Office 2007.   These &#8216;Developer Guides&#8217; include information on VBA for Office and other topics related to software development for Office 2007.  They are all available at the same [...]]]></description>
			<content:encoded><![CDATA[<p>I mentioned last week that Microsoft has VBA reference guides available for download for Office 2003.  They also have free references guides for Office 2007.   These &#8216;Developer Guides&#8217; include information on VBA for Office and other topics related to software development for Office 2007.  They are all available at the same URL:</p>
<p><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=066f9f31-9d7b-4d5e-8759-55fb4bf24d52&amp;DisplayLang=en" target="_blank">Developers Guides for Office 2007</a></p>
<p>On this page you can get all of the files in one download or you can download individual references:</p>
<ul>
<li>Object Library Reference</li>
<li>Access 2007 Developer Reference</li>
<li>Excel 2007 Developer Reference</li>
<li>PowerPoint 2007 Developer Reference</li>
<li>Project 2007 Developer Reference</li>
<li>Publisher 2007 Developer Reference</li>
<li>SharePoint Designer 2007 Developer Reference</li>
<li>Visio 2007 Developer Reference</li>
<li>Visio 2007 ShapeSheet Reference</li>
<li>Word 2007 Developer Reference</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://vba.info/?feed=rss2&amp;p=14</wfw:commentRss>
		</item>
		<item>
		<title>Free VBA for Office 2003 References from Microsoft</title>
		<link>http://vba.info/?p=1</link>
		<comments>http://vba.info/?p=1#comments</comments>
		<pubDate>Mon, 20 Oct 2008 14:00:29 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
		
		<category><![CDATA[Documentation]]></category>

		<category><![CDATA[free]]></category>

		<category><![CDATA[microsoft]]></category>

		<category><![CDATA[office]]></category>

		<category><![CDATA[reference]]></category>

		<guid isPermaLink="false">http://vba.info/?p=1</guid>
		<description><![CDATA[Microsoft offers several free VBA references.  Each is available for download as a .chm (Help) file and as an online references.  These references contain conceptual overviews, programming tasks, samples, and references to help you  write VBA for Microsoft Office applications:]]></description>
			<content:encoded><![CDATA[<p>Microsoft offers several free VBA references.  Each is available for download as a .chm (Help) file and as an online references.  These references contain conceptual overviews, programming tasks, samples, and  references to help you  write VBA for Microsoft Office applications:</p>
<p>Available are:</p>
<ul>
<li><a href="http://www.microsoft.com/downloads/details.aspx?familyid=19A01EAD-0CE1-458F-98DA-9B1B9CFB0B41&amp;displaylang=en" target="_blank">VBA Language Reference for the Office Object Model</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?familyid=2204A62E-4877-4563-8E83-4848DDA796E4&amp;displaylang=en" target="_blank">Excel VBA Language Reference</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?familyID=179BEE82-E6E6-4B78-AFF9-9A541167541F&amp;displaylang=en" target="_blank">Word VBA Language Reference</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0447c5a0-5e58-4e69-b90e-c42ec7dbf887&amp;DisplayLang=en" target="_blank">Access VBA Language Reference</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?familyID=9C0AA0F6-A164-4F87-A01A-1BC17E698E22&amp;displaylang=en" target="_blank">PowerPoint VBA Language Reference</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?familyID=A1CEAD80-23E2-456F-8618-4DA50CC2C38C&amp;displaylang=en" target="_blank">Outlook VBA Language Reference</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=f1410bd2-a46a-49e2-80f8-23a36fdf3af3&amp;DisplayLang=en" target="_blank">Publisher VBA Language Reference</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=1d8d97ac-1e92-441a-aa60-3ec55942e322&amp;DisplayLang=en" target="_blank">FrontPage VBA Language Reference</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://vba.info/?feed=rss2&amp;p=1</wfw:commentRss>
		</item>
	</channel>
</rss>
