Visual Basic for Applications

From Wikibooks, open books for an open world
Jump to: navigation, search

Introduction[edit]

This set of pages is intended for those who have an existing interest in VBA coding. It provides working code that the author himself finds of interest. Many of the procedures have good generality, for example, code for logging data, returning a file address, hashing, and others.

In most cases the code of each page can be copied into a standard VBA Excel module, though in many cases will work in other Office applications, with or without slight modification.

VBA Editor Settings[edit]

Because users' computers vary as to the Windows applications installed, it might be helpful to know which References have been set in the Tools menu of the authors' VBA editors. Authors who add to the work should update any of theirs to the list. These currently include:

  • Visual Basic for Applications
  • Microsoft Excel 14.0 Object Library
  • Microsoft Office 14.0 Object Library
  • OLE Automation
  • Visual Basic for Applications Extensibility 5.3
  • mscorlib.dll
  • Microsoft Scripting Runtime
  • Microsoft Forms 2.0 Object Library
  • Microsoft Speech Object Library

Interest Areas[edit]

The following pages are offered as a starting point to get things going. Contributors are invited to edit and add to these pages, and to add new ones. I hope to fill in a bit more of the textual descriptions in the near future.

Charts[edit]

Clipboard[edit]

Error Handling[edit]

Files and Folders[edit]

Fonts and Formats[edit]

Hashing Strings and Files[edit]

Logs and Text Files[edit]

Message and Input Boxes[edit]

Numbers[edit]

Range[edit]

Sorting[edit]

Sound[edit]

User Forms[edit]

VBA Editor Projects[edit]

Viterbi Project[edit]

Worksheet Transfers[edit]

ASCII Log Data from LAS File[edit]

Related books[edit]