How to import userform from VBA to .Net

andy7789 used Ask the Experts™
Hi X-perts,

Is there a way of importing a VBA created userform to .NET (Visual Studio)?
If I open a .frm file, it opens a code only, but not the design form itself. If I open .frx file, it shows a hex code.

Please, advise.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
To the best of my knowledge, you can't migrate automatically userforms into Visual Basic does not support the VBA UserForms. You should migrate these to Windows Forms.

Unless someone has some sort of application that does this, I suggest you redesign them. It's for the best anyway, and you'll probably end up streamlining your code.

well you aren't supposed to open the .frx file. Don't open the .frm file directly either. Use the VB.NET 'import" feature, and import the frm file. It will automatically build the .designer document from the frx file accompanying it.


yes, it could be great to import it automatically, though, probably, the best would be to redo it from scratch (quite a huge form with 12 pages and over 700 controls...)

Sorry for a silly question: where is an import feature for VB.NET? I have a Professional Edition 2008 with office tools installed, but cannot find it. If I click on .frm file it opens the code only
IT Pro/Developer
Top Expert 2008
You cannot convert directly VBA to .NET.
Check this article that helps you with some points when you manually convert the code:
Converting Code from VBA to Visual Basic .NET 


jpaulino, thank you, very helpful reference.

Could you please, have a look at my other problem:

With your expertise, it should be easy to point me into a right direction


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial