Skip to Content
Programming Excel with VBA and .NET
book

Programming Excel with VBA and .NET

by Jeff Webb, Steve Saunders
April 2006
Beginner
1114 pages
98h 16m
English
O'Reilly Media, Inc.
Content preview from Programming Excel with VBA and .NET

Approaches to Working with .NET

There are three main approaches to using .NET with Excel. You can use .NET to create:

Components that can be used from Excel macros

This approach works with all Excel versions and is much the same as creating COM components for use with Excel using earlier versions of Visual Basic. The .NET tools automatically generate the type libraries needed to use .NET objects from COM applications such as Excel.

Standalone applications that use Excel as a component

This approach works best with Excel XP and 2003, since those versions provide the files needed to use Excel from .NET applications smoothly. In this scenario, the user starts a standalone application to create or modify Excel wo rkbooks.

Workbook-based applications that run all of their code as .NET

This approach works for Excel 2003 and later. In this scenario, the user opens the workbook, which automatically loads the .NET assembly containing the application code. The workbook contains a link to this assembly, so the workbook file (.xls) can be distributed to many different users and locations, while the assembly (.dll) resides in a single location (for example at a network address).

From the user’s standpoint, the main differences between these approaches are how you start the application and what versions of Excel are supported. From a developer’s standpoint, the differences affect how you develop, debug, and deploy the applications. Even the development tools you need vary somewhat between these ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Excel 2013 Power Programming with VBA

Excel 2013 Power Programming with VBA

John Walkenbach
Excel 2016 Power Programming with VBA

Excel 2016 Power Programming with VBA

Michael Alexander, Richard Kusleika
Excel 2016 VBA and Macros

Excel 2016 VBA and Macros

Bill Jelen, Tracy Syrstad

Publisher Resources

ISBN: 0596007663Errata Page