From VBA to VSTO


April 2006

From VBA to VSTO

Ease your VSTO apprehension!

Like you, I am among a generation of people who use and rely on VBA as Excel's macro language. There are contingents within Microsoft that want to shift the focus away from VBA. In Excel 2003, there were actually a few tasks that could no longer be programmed in VBA - you had to use Visual Studio Tools for Office (VSTO). New features like smart tags or the research task pane required you to use VSTO instead of VBA. I will admit - VSTO scares me. I can't get my arms around it. All of the training so far is designed to teach a VB.Net programmer how to do a few things with Office. There is nothing out there that will take someone who is comfortable with VBA and introduce them to VSTO.

Gerry Verschuuren has written a number of cool training materials that I publish. You might have learned VBA from Gerry's interactive CD, Slide Your Way Through Excel VBA or Access VBA Made Accessible. Gerry is also a VB.net programmer. I asked Gerry if he could develop something that would help VBA programmers like me get comfortable with VSTO.

Bill Jelen, MrExcel
Add to Cart: $9.99 »

category: VBA
covers: Office 2007

Product Details
  • 202 Pages
  • Publisher: Holy Macro! Books
  • PDF ISBN: 978-1-9328-0260-3

The Rosetta Stone Concept

Do you remember learning about the Rosetta Stone in world history? Scholars were trying to puzzle out this strange language for centuries. Suddenly, in 1799 near the town of Rosetta in Egypt, they discovered a stone carving with the exact same text in three ancient languages. Since they knew two of the languages, they were finally able to figure out the structure of the third unknown language.

In each chapter, Gerry finishes the chapter with a Rosetta Stone showing how to achieve the exact same problem in both VBA and VSTO. You will actually turn the book sideways to compare VBA on the left with VSTO on the right. You already know VBA - by comparing the two scripts side by side, you can spot the differences.

As an aside, this drove our printer crazy... "Hey! this page is sideways are you really sure about this???".

While most of the book looks like a typical portrait book...

Portrait book

...the Rosetta Stone case studies are printed landscape to compare VBA and VSTO side by side.

Landscape book
  • 1 Visual Studio Tools for Office

    • 1.1 Why VSTO?
    • 1.2 The New Tool: VSTO
    • 1.3 The New Language: VB
  • 2 Structure of the Tool (VSTO)

    • 2.1 The .NET Framework
    • 2.2 The Workspace (IDE)
    • 2.3 Connecting to Office Applications
    • 2.4 References
    • 2.5 What About Your Macros?
    • 2.6 Case Study: A Rosetta Stone
  • 3 Structure of the Language (VB

    • 3.1 The Hierarchy of the Base Classes
    • 3.2 Core Objects
    • 3.3 Host Controls
    • 3.4 Case Study: A Rosetta Stone
  • 4 Syntax Changes in VB

    • 4.1 Properties
    • 4.2 Methods and Functions
    • 4.3 Events
    • 4.4 Case Study: A Rosetta Stone
  • 5 Changes in Data Types and Scope

    • 5.1 Data Types
    • 5.2 New Arithmetic Operators
    • 5.3 Scope and Control Structures
    • 5.4 Case Study: A Rosetta Stone
  • 6 Array Changes

    • 6.1 Regular Arrays
    • 6.2 Structured Arrays
    • 6.3 What happened to Variant Arrays?
    • 6.4 Case Study: A Rosetta Stone
  • 7 Forms Instead of UserForms

    • 7.1 Form Class
    • 7.2 Form Elements
    • 7.3 Form Events
    • 7.4 The New ActionsPane
    • 7.5 Case Study: A Rosetta Stone
  • 8 Error vs. Exception Handling

    • 8.1 An Improved Alternative
    • 8.2 Some Debugging Issues
    • 8.3 Case Study: A Rosetta Stone
  • 9 File Management

    • 9.1 Text Files
    • 9.2 Binary Files
    • 9.3 Dialog Controls for File Management
    • 9.4 Case Study: A Rosetta Stone
  • 10 External Databases

    • 10.1 DAO Library
    • 10.2 ADO Library
    • 10.3 And Then There Is ADO
    • 10.4 Host Controls Revisited
    • 10.5 Dynamic Forms
    • 10.6 Case Study: A Rosetta Stone
  • 11 Building Your Own Classes

    • 11.1 New Elements
    • 11.2 Real Inheritance
    • 11.3 Garbage Collection
    • 11.4 Case Study: A Rosetta Stone
  • 12 Deployment and Security

    • 12.1 Security
    • 12.2 Deployment
  • 13 Migrating from VBA to VSTO

    • 13.1 VBA or VSTO?
    • 13.2 Automatic and/or Manual Migration
    • 13.3 Case Study: A Rosetta Stone
  • 14 What Do You Need to Get Started?

    • 14.1 How, What, and When to Install?
    • 14.2 Useful Resources
    • 14.3 Are You Ready?

Where to Buy

MrExcel Bookstore

eBook from MrExcel.