XL97: Using the LoadPicture Function with an Image Control (162050)
The information in this article applies to:
- Microsoft Excel 97 for Windows
This article was previously published under Q162050 SUMMARY
In Microsoft Excel 97, you can add an Image control to a UserForm. There
are two ways to specify which picture file is displayed in the Image
control; you can specify the picture when you design the UserForm, or when
you run the UserForm. The technique you use depends on whether you want to
store the picture file with your project.
The advantage of using the run-time method is that the picture file is not
stored with the project, which minimizes the size of the project. However,
if you distribute the project to others, you must remember to include the
picture file with the project file, and you must provide instructions for
placing the picture file in the correct location.
This article provides an example Visual Basic for Applications macro that
uses the LoadPicture function to load a picture file into an Image control
during run time.
REFERENCES
For more information about the Image control, click the Office Assistant in
the Visual Basic Editor, type image control, click Search, and then click
to view "Things you can do with an Image control".
NOTE: If the Assistant is hidden, click the Office Assistant button on the
Standard toolbar. If <Product> Help is not installed on your computer,
please see the following article in the Microsoft Knowledge Base:
120802 Office: How to Add/Remove a Single Office Program or Component
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbdtacode kbProgramming KB162050 |
---|
|