|
Figure 4
Loadpic.bas
Private Sub btnLoadPic_Click()
Dim obj As Object
' Start a new (hidden) instance of Microsoft Excel
Set obj = CreateObject("Excel.Sheet")
' Insert a picture in a supported format
Call obj.Pictures.Insert("VISPROG.CDR")
' Select the newly inserted object
obj.DrawingObjects("Picture 1").Select
' Copy the selected object
obj.Application.Selection.Copy
' Paste the object's picture to the Picture box
picFromXL.Picture = Clipboard.GetData()
' Destroy the instance of Excel
Set obj = Nothing
End Sub
Figure 5
Microsoft Excel Import Formats
AutoCad Format 2-D (.DXF) file CompuServe GIF (.GIF) file Computer Graphics Metafile (.CGM) CorelDRAW 3.0 (.CDR) file Encapsulated PostScript (.EPS) file HP Graphics Language (HPGL) file (.HGL) JPEG Filter (.JPG) Kodak Photo CD (.PCD) Macintosh PICT (.PCT) file Micrografx Designer/Draw (.DRW) file PC Paintbrush (.PCX) file Tagged Image File Format (.TIF) file Targa (.TGA) Windows Bitmap (.BMP) Windows Metafile (.WMF) file WordPerfect Graphics (.WPG) file
|