Moving to Visual Basic

VSTO 2005 supports two programming languages: Visual C# and Visual Basic 2005. If you're planning to move from VBA to managed code, it might not make a difference which language you choose, and it might even be in your best interest to learn both. However, developers who are familiar with C++ would probably find it easier to learn C#, because there are many similarities between the languages. For example, C++ and Visual C# share a similar syntax. Similarly, VBA developers might find it easier to move to Visual Basic 2005.

It's challenging enough to learn to use a new integrated development environment, debugging tools, the .NET Framework class libraries, the .NET Framework security model, and object-oriented programming concepts without having to learn a completely different programming language. Additionally, if you migrate your existing VBA solutions to VSTO and plan to use any migration tools, such as the Visual Basic Migration Wizard, these tools would most likely convert the VBA code directly to Visual Basic 2005. You would have to take additional steps to then convert the code into Visual C#. For more information about migrating VBA solutions to VSTO, see Chapter 12.

For these reasons, we believe it makes sense to make the move from VBA to Visual Basic 2005 rather than to Visual C#. Once you are more familiar with programming Office applications using VSTO, you can transfer those skills if you decide to program with C#.

Although there are many similarities between VBA and Visual Basic 2005, there are several differences. These differences range from language changes such as data types and array bounds to new features of Visual Basic 2005, such as the My objects and IntelliSense code snippets. You also must learn about the differences between ActiveX controls and Windows Forms controls. In this chapter we describe these differences and introduce you to some of the new features in Visual Basic 2005.

0 0

Post a comment