VBA . info

Your source for information on VBA

Writing to a Text File in VBA

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 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 Print # statement.  The Print # statement goes back to the original BASIC compilers and their GOTOs, GOSUBs and line numbers.  I wrote code in BASIC using Print # 30 years ago.

Read the rest of this entry »

Microsoft is offering some free programming e-books.  They aren’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’s “Book Connection Newsletter.”

Introducing Microsoft SQL Server 2008

Learn about major new features in SQL Server 2008 including security, administration, and performance.

  • Chapter 1: Security and Administration
  • Chapter 2: Performance
  • Chapter 3: Type System
  • Chapter 4: Programmability
  • Chapter 5: Storage
  • Chapter 6: Enhancements for High Availability
  • Chapter 7: Business Intelligence Enhancements

Visual Studio Related: LINQ, ASP,NET and Silverlight

There are three books available on this page:

  • Programming Microsoft LINQ
  • Programming Microsoft® ASP.NET 3.5
  • Introducing Microsoft Silverlight 2

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 ‘Developer Guides’ include information on VBA for Office and other topics related to software development for Office 2007. They are all available at the same URL:

Developers Guides for Office 2007

On this page you can get all of the files in one download or you can download individual references:

  • Object Library Reference
  • Access 2007 Developer Reference
  • Excel 2007 Developer Reference
  • PowerPoint 2007 Developer Reference
  • Project 2007 Developer Reference
  • Publisher 2007 Developer Reference
  • SharePoint Designer 2007 Developer Reference
  • Visio 2007 Developer Reference
  • Visio 2007 ShapeSheet Reference
  • Word 2007 Developer Reference

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:

Available are: