Convert a VBA Modeless Userform UI to C# or VB.Net

Add-in Express™ Support Service
That's what is more important than anything else

Convert a VBA Modeless Userform UI to C# or VB.Net
Conversion of a working VBA "dictator application" to a COM or .XLL add-in using C# or VB.Net 
David Strickler




Posts: 2
Joined: 2011-08-28
Using Bovey, Wallentin, et al's "Professional Excel Development" guide, I've developed a working "dictator application" in VBA. By "dictator application," I mean an .XLA that effectively hides Excel, and instead presents the user with a non-spreadsheet UI using a modeless userform. My application uses a multipage control inside the userform to create a wizard that solicits text and numerical inputs from the user. After collecting the user inputs, the application calculates and presents an analysis of the user-provided data on the last two pages of the wizard.

Because my application's target market has little or no experience with Excel, and even less desire to learn Excel, it's critical that the application's UI either hide Excel or otherwise not resemble a typical spreadsheet. The application performs a number of basic computations, but the application's real proprietary advantage is in the concept and layout, not the computations themselves.

The .XLA I developed in VBA works perfectly, but I need to convert it to something compilable in order to protect the code. It also makes sense to switch now because the next version of the application will be much more complex, and will likely outrun the capabilities of VBA.

My setup: Windows XP running on a Mac using VMWare Fusion, MS Office 2007, MS .Net Framework 4.0, Visual C# 2010 Express and Visual Basic 2010 Express, Add-In Express for MS Office and .Net 2010, Standard.

After perusing the Add-In Express learning center and forums, I'm not even sure how to begin. I can find no reference to Excel userforms, let alone multipage userforms, anywhere in Visual Express or Add-in Express. If userforms are not supported outside of VBA, that's fine as long as there is some other object I can use to create a type of modeless wizard.

Any suggestions? Also, can anyone provide any feedback on whether my application would work best as a COM add-in or .XLL?
Posted 28 Aug, 2011 15:39:50 Top
Eugene Astafiev


Guest


Hi David,

It is up to you what technology to use for the application. However, it looks like a COM add-in suits your needs much better. Please read more about COM add-ins in the http://msdn.microsoft.com/en-us/library/aa141383%28v=office.10%29.aspx article and about XLL add-ins in the http://msdn.microsoft.com/en-us/library/bb687911.aspx article in MSDN.

Also you may be interested in the http://www.add-in-express.com/creating-addins-blog/2008/12/19/migrate-delphi-vba-code-net/ and http://www.add-in-express.com/creating-addins-blog/2009/04/02/office-outlook-com-addin/ articles on our technical blog.
Posted 29 Aug, 2011 04:21:34 Top
David Strickler




Posts: 2
Joined: 2011-08-28
Thanks, Eugene.

I found this http://www.vb-helper.com/howto_net_button_wizard.html that explains how to create a wizard in VB.net using group boxes. So far it shows promise, and if I can get it to compile I'll circle back and share what I learned.
Posted 02 Sep, 2011 20:10:35 Top
Eugene Astafiev


Guest


You are welcome, David!
Posted 05 Sep, 2011 04:34:02 Top