Error message when you run a VBA command in the Immediate window of the Visual Basic Editor: "Runtime Error '4120' Bad parameter"

Article translations Article translations
Article ID: 948682 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

Consider the following scenario. You install the OEM version of the 2007 Microsoft Office system. You start Microsoft Office Word 2007. In the Immediate window of the Microsoft Visual Basic Editor, you run one of the following Microsoft Visual Basic for Application (VBA) commands:
  • application.showwindowsinTaskbar=false
    
  • application.Options.ConfirmConversions = False
    
  • application.Options.BackgroundSave=False
    
  • application.Options.SmartCursoring=False
  • application.Options.AllowDragAndDrop=False
In this scenario, you may receive the following error message:
Runtime Error '4120'
Bad parameter
OK Help
Note This issue may not occur for all computers that are running the OEM version of the 2007 Office system. Also, this issue may not occur for all VBA commands.

CAUSE

This issue occurs because the NoUserName option is set to true when the OEM version of the 2007 Microsoft Office system is installed. Therefore, a blank UserInfo registry entry is created, and the user name and the initials are blank.

The user name and initials are stored in the following registry location:
HKEY_CURRENT_USER\Software\Microsoft\Office\Common\UserInfo

RESOLUTION

To resolve this issue, add the user name and the initials in the Word Options dialog box.

To do this, click the Microsoft Office Button, click Word Options, enter a user name and initials under Personalize your copy of Microsoft Office, and then click OK.

Properties

Article ID: 948682 - Last Review: February 22, 2008 - Revision: 1.0
APPLIES TO
  • Microsoft Office Word 2007
Keywords: 
kberrmsg kbtshoot kbprb kbexpertisebeginner KB948682

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com