Want to become an expert in VBA? So this is the right place for you. This blog mainly focus on teaching how to apply Visual Basic for Microsoft Excel. So improve the functionality of your excel workbooks with the aid of this blog. Also ask any questions you have regarding MS Excel and applying VBA. We are happy to assist you.

.frx File

.frx file is a file type which can be opened with softwares like FoxPro. So what’s the relation of .frx file with Excel VBA? You should know the relationship if you have ever exported or imported a form from or to your VBA projects. When we export forms from VBA projects it creates two files of two different types. One file with .frm extension and another with the .frx extension. .frm file contains the codes of the form. The .frx file includes the elements of the form file. Especially the graphical elements. Suppose we have a form named “frmMain” in our VBA project. So if we export this form, two files will be created. One file would be frmMain.frm and other file would be frmMain.frx

VBA project with a form

As you can see in the properties window, the name of the form is frmMenu.

.frm and .frx files are created inside the folder

In the above example I have named the form as frmMenu. You may think why I have named it as “frmMenu” instead of “Menu”. That’s because, in conventional naming method we use “frm” word in front of the sensible name. If you have a userform with name “Userform1'' then two files would be Userform1.frm and Userform1.frx

Now let’s look at the importance of the .frx file in the form importing. Assume I want to import that exported form to this new VBA project.

New VBA project

Do we need to import both .frm and .frx files? We can’t select both the files and import them together. You can only select .frm file and import it. However, the .frx file needs to stay in that same folder when you import the .frm file. This is what will happen if the .frx file is missing when you import the form.

Error message due to absence of .frx file
Second error message
Third error message due to absence of .frx file

Then a new file will be created with .log extension in the same folder. In this case frmMain.log

.log file is created inside the form
Content of a .log file

So if you want to import a form to your VBA project, you should have both .frm and .frx file in the same folder.

Contact Form


Email *

Message *