VSTO for VBA developers

V

Last weekend I presented at Office DevCon on the topic of VSTO for VBA developers.

This is an interesting use case because you essentially have a group of very experienced, highly productive developers, all extremely familiar with their technology. So my aim was to look at how Microsoft is supporting this community (as opposed to say pushing them into a new technology). I chatted about this previously.

The key is VBA / VSTO Interop, which allows VBA code to easily call VSTO code and vice versa.

The benefit of this approach is that VBA developers can (and should) continue to use their existing skill-set primarily, and easily take advantage of the .NET VSTO stuff in bite sized chunks when appropriate. There’s no either/or scenario here, it is very much one of complementing each other.

My presentation is available on my SkyDrive here, and I’ve recorded an 11 minute demo of how VBA and VSTO can call each other (its an Excel example, and is very much based on Daniel Moth’s excellent demo, which I referred to back in July). It also demos how bad my typing is :-)


VBA and VSTO Interop from Craig Bailey on Vimeo.

I recorded this with Camtasia and left in many of the zoom-n-pan effects. Tell me if it’s too much.

Technorati Tags: VBA,VSTO,Interop

9 comments

  • Very informative! As a die-hard VBA developer, I’ve been reluctant to dip my toes in the VSTO pond. This video made me a little more comfortable. Nicely done!

  • Very informative! As a die-hard VBA developer, I’ve been reluctant to dip my toes in the VSTO pond. This video made me a little more comfortable. Nicely done!

  • Thank you for this Post it’s very useful

    I’ve got Question. How can I customize the VB or C# Code of an Excel Workbook, after release? The user shout be able to customize the VBA Code without Visual Studio and after that I should be able to customize the VB or C# Code without loosing the users VBA Code and/or range-contents. I hope you understand my problem.

  • Thank you for this Post it’s very useful

    I’ve got Question. How can I customize the VB or C# Code of an Excel Workbook, after release? The user shout be able to customize the VBA Code without Visual Studio and after that I should be able to customize the VB or C# Code without loosing the users VBA Code and/or range-contents. I hope you understand my problem.

  • I’d like to program macro’s using VisualStudioForApplications instead of VisualBasic For Application because of:

    1. VB.NET and C# are perfectly OOP, whilst VBA is only object-based.
    2. VB.NET and C# have a superb exception mechanism, whilst VBA works with the dreaded ON ERROR statement. Especially I consider ON ERROR RESUME NEXT as a very dangerous statement!
    3. Macros are in the new case compiled to MSIL and Jitted to native-code.

  • I’d like to program macro’s using VisualStudioForApplications instead of VisualBasic For Application because of:

    1. VB.NET and C# are perfectly OOP, whilst VBA is only object-based.
    2. VB.NET and C# have a superb exception mechanism, whilst VBA works with the dreaded ON ERROR statement. Especially I consider ON ERROR RESUME NEXT as a very dangerous statement!
    3. Macros are in the new case compiled to MSIL and Jitted to native-code.

About Craig

I'm the co-host of HubShots and the CEO of XEN - helping mid-large B2B companies with their digital marketing and lead generation.

Craig Bailey

Archives

Posts