Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

XL2000: Cannot Paste a Picture into a UserForm


View products that this article applies to.

This article was previously published under Q211756

↑ Back to the top


Symptoms

When you copy a picture or other graphic object, you cannot paste the picture into a UserForm in Microsoft Excel 2000. The Paste command is unavailable.

↑ Back to the top


Cause

The only objects you can paste into a UserForm are the UserForm controls.

↑ Back to the top


Workaround

To work around this behavior, use either of the following methods.

Method 1: Insert a New Dialog Sheet

Although you cannot paste a picture into a UserForm, you can paste the picture into a dialog sheet in Excel 2000. To insert a new dialog sheet, follow these steps:
  1. Right-click any sheet tab in the workbook. On the shortcut menu, click Insert.
  2. In the Insert dialog box, click the General tab, click MS Excel 5.0 Dialog, and then click OK.
NOTE: Dialog sheets do not support as wide a range of functionality as do UserForms.

Method 2: Insert a Picture Using the Image Control

To insert a picture into a UserForm using the Image control, follow these steps:
  1. Save the picture to a separate graphic file in one of the following formats: Bitmap (.bmp, .dib), JPEG (.jpg), GIF (.gif), Metafile (.wmf, .emf), or Icon (.ico, .cur).
  2. If the Control Toolbox toolbar is not visible in your UserForm, point to Toolbars and then click Control Toolbox on the View menu.
  3. Click the Image control, and draw a box on the UserForm where you would like the picture to appear.
  4. In the Properties window for the Image control, click the Picture property. In the Load Picture dialog box, navigate to your graphic file and click Open.

    Your picture is displayed in the UserForm.

↑ Back to the top


References

For more information about inserting controls in UserForms, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type toolbox in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top


Keywords: KB211756, kbprb

↑ Back to the top

Article Info
Article ID : 211756
Revision : 4
Created on : 9/27/2003
Published on : 9/27/2003
Exists online : False
Views : 237