VBA vs. VS – Part 4: .Net Framework

.Net Framework may be new to a lot of VB6 / VBA developers; however, the idea is not new.  When we used VBA / VB6 to create a simple graphic user interface (GUI), e.g. MsgBox or use Data Access Objects (DAO) to retrieve data from Microsoft Access, we are actually calling a runtime class library that contains millions line of code.  We don’t have to worry about all the Windows / database API and we don’t need to manage the messages flying around domain specific objects.  The VB6 runtime and DAO would take care everything for us and we only need to focus on business logic.  This is the beauty of VB6 / VBA.  Let Microsoft takes care about the technical complexity ! 

This is the same concept behind .Net Framework; the Common Language Runtime (CLR), the runtime environment for .Net Framework is more powerful than VB6 runtime and the Framework Class Library provides a larger range of features.

If you read my blog VBA vs. VS – Part 1: Performance Review, you can see how easy and powerful .Net Framework can be.  Instead of using a regular For statement, I used Parallel.For; Parallel is a new feature of .Net Framework which would make the best use of our multi core CPU.  The performance was improved by 2.5 times.  We would not be able to maximize our hardware investment if we are using VB6 / VBA.

.Net Framework

The .Net Framework consists of 2 main components, Common Language Runtime (CLR) and Framework Class Libraries (FCL).

    Common Language Runtime

    CLR is an abstraction layer over the operating system that all .Net programs are running on.  It takes care all technical details for developers; so we don’t need to worry about:

  • CPU management
  • Memory management
  • Thread management
  • Objects management
  • Exception handling
  • Garbage collection
  • Security

We can use VB.Net, C#, C++ and other .Net compliance languages to develop applications.  CLR makes it easy to design components and applications whose objects interact across different programming languages. Objects written in .Net languages can communicate with each other, and their behaviors can be tightly integrated.

Framework Class Libraries

FCL is a a collection of thousands of reusable classes that encapsulate a large number of common system functionality.  To name a few, it provides simple file I/O, GUI, and database services or we can use something much more powerful and sophisticated such as parallel programming, distributed computing, workflow and cryptographic services. 

As a business developer, even if I have the technical knowledge, it may take me months to build a financial application that can fully utilize my multi cores CPU.  How much effort do we have to spend if we want to migrate the same application to a server farm with hundred or even thousand CPU?


.Net Framework has many advantages over VB6 / VBA.

Multi-Language Development Platform

Instead of just using VB, CLR allows us to use the language we prefer.  We can use:

  • Static Language – Visual Basic.Net, C# and C++ .
  • Dynamic Language – Managed JScript, IronRuby, and IronPython.

User Experiences

Developers can use Windows Presentation Foundation (WPF) or Silverlight to develop richer GUI.

Most Windows developers are not graphic designer and graphic designers do not always know how to program.  WPF provides a common file format (XAML) which allows designers to work alongside developers in a workflow that promotes creativity while maintaining full fidelity.  WPF is a powerful framework that we can integrates GUI, documents, 2D and 3D graphics, hardware accelerated effects, and media content. 

Silverlight provides a cross-browser, cross-platform, and cross-device plug-in for advertising and rich interactive applications

Web Applications

Everyone is using the web now!  How can we run our applications on web?

ASP.NET enables developers to create anything from small, personal Web sites through to large, enterprise-class dynamic Web applications. Together with Asynchronous JavaScript and XML (AJAX ), developers can quickly create efficient, interactive, and highly personalized web sites

Distributed Systems

Do our systems need to communicate with our business partners or services providers?  Do we want to build a server farm to run our financial model?

Windows Communication Foundation (WCF) provides a model that developers can rapidly build service-oriented applications that communicate across the web and the enterprise.

Business Processes

We work as a team.  How can we work more effectively together?

Windows Workflow Foundation (WWF) delivers a  model that developers can use to build a business process which enable closer collaboration among business users.

Data Access

We already have DAO to access data from relational database but we now have data from XML and other applications.

ADO.NET provides a rich set of components for creating distributed, data-sharing applications,providing access to relational, XML, and application data.


If you visit Microsoft .NET Framework Class Library, you would see how feature rich it is.  I have used .Net Framework for over 5 years but I seriously doubt if I ever use more than 10% of the functionality.  I can  now develop web sites, distributed systems, and cloud applications.  Accessing data from RDB, XML and other applications is much easier.  I can  do thing that was impossible with VB6 / VBA or at least 10 times harder!

Andrew Chan is the owner and founder of ALG Inc.

We help you to make better and faster decisions!

About Andrew Chan
Andrew Chan is an Business Consultant who gives you accurate, consistent and timely information so that you can make better and faster decisions. He is an Associate of Society of Actuaries with over 20 years of IT experience. Apart from strong analytical skills and proven technical background, he was also a former system director at Manulife who had extensive project management experience. If you are looking for someone to gather, consolidate, validate, visualize and analyze data, look no further! Andrew can provide the most cost effective business analytics solution so that you can explore, optimize, predict and visualize your business. Don’t guess on any decision, no matter it is finance, operation, marketing or sales! Always ask for evidence!

6 Responses to VBA vs. VS – Part 4: .Net Framework

  1. Pingback: Happy 17 Birthday Visual Basic for Applications! « Technologies and your business

  2. Pingback: VBA vs. VS – Part 1: Performance Review « Technologies and your business

  3. Pingback: VBA vs. VS – Part 2: Programming Paradigm Review « Technologies and your business

  4. Pingback: VBA vs. VS – Part 3: What is new in VB.Net? « Technologies and your business

  5. Pingback: VBA vs. VS – Part 5: First Excel Project « Technologies and your business

  6. Pingback: VBA vs. VS – Final: To Migrate or NOT To Migrate « Technologies and your business

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: