Share via

Problem with userforms in Word VBA

Anonymous
2018-02-22T19:38:07+00:00

I recently upgraded from office 2003 to Office 2010 an am running win 10.

If I open a word doc and try to use VBA to insert a userform No form shows up and I get an error

message "Component not correctly registered" See image. The userforms work fine in Excel and Powerpoint, just not in Word.

Any ideas or suggestions on how to fix this would be greatly appreciated.

Ken

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. Jay Freedman 207.7K Reputation points Volunteer Moderator
    2018-02-24T02:39:21+00:00

    Since you found copies of FM20.DLL in two different folders, there's something else to check: In Excel, in the Tools > References dialog, click on the Forms 2.0 item in the list. At the bottom of the dialog, what path is shown? If it's the sysWOW64 folder, then try using regsvr32 to register that one, and see if Word will use it. Use the command line shown in my previous screen shot of the Command Prompt window.

    The "now you see it, now you don't" behavior of the one in the system32 folder has me mystified. I wonder whether you'll have a better shot if you actually log in as the administrator rather than just using admin credentials from a standard login.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2018-02-23T22:36:22+00:00

    You may be on to something Jay but for some reason that file does not show up in my windows\system32  folder when looking with windows explorer. I changed the options to show hidden and system files etc but no go. If I use a different file explorer like file commander, it does show up. Running Regsvr32 fails like it can't find the file. The file also shows up in the syswow64 folder but I don't know if there is  a way to register that one.

    If I go to VBA and go to the editor and go to tools,references I can browse and find the file in the window\system32 folder and click it it shows up on the list but won't stay there if I exit and reopen word  and still does not work.

    I checked in Excel and it is on the list and works so you would think that it must be registered OK.

    Any other thoughts?

    Thanks

    Ken

    Was this answer helpful?

    0 comments No comments
  3. Jay Freedman 207.7K Reputation points Volunteer Moderator
    2018-02-23T02:19:08+00:00

    The userform code (and lots of other stuff) is in the file FM20.DLL, which should have been correctly installed by the Office installer. At a guess, something (a permission problem, an antivirus program, who knows what) interferes with that. If the file is in the correct place, it should be possible to set its registry entries correctly by the following procedure:

    • Search the C: drive to find FM20.DLL. It may be in C:\Windows\System32, C:\Windows\SysWOW64, somewhere in C:\Program Files\Microsoft or C:\Program Files (x86)\Microsoft, more than one of those folders, somewhere else, or not present at all. Be sure to turn on the "Hidden items" check box in the View tab of File Explorer before searching.
    • Assuming you do find the file, copy the full path to it. (If it isn't present anywhere, there may be something wrong with the Office installer.)
    • In the Windows Start menu, expand the Windows System group, right-click the Command Prompt icon, and click More > Run as administrator. Enter the Administrator password.
    • In the Command Prompt window, type regsvr32 followed by a double quote mark; type or paste the full path to FM20.DLL; and close with another double quote mark. The command line should now look like this (but with your correct path):

    • Press Enter at the end of the line. In a second or two, you should see a message that FM20.DLL was successfully registered.
    • Restart Word and try again to insert a userform. It should (!) now work. If you then open the Tools > References dialog in the macro editor, you should see Microsoft Forms 2.0 in the list.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2018-02-22T20:16:31+00:00

    Thanks for the reply Doug.

    I have gone through a complete removal and reinstall and then a repair again but still no help.

    Ken

    Was this answer helpful?

    0 comments No comments
  5. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2018-02-22T19:58:17+00:00

    Was this answer helpful?

    0 comments No comments