投稿日 | : 2002/09/29(Sun) 13:26 |
投稿者 | : ap202 |
Eメール | : |
URL | : |
タイトル | : 画像の表示 |
vbでエクセルのシートに貼り付けたイメージコントロールに
画像を表示したいんですが、下記のようなコードでは
ダメでした。☆印の所をどう書けばいいんですか?
-------------------------------------------------
Dim wExcel As Excel.Application
Dim wWorkBooks As Excel.Workbook
Dim wWorkSheets As Excel.Worksheet
Dim image1 As OLEObject
Set wExcel = New Excel.Application
Set wWorkBooks = wExcel.Workbooks.Open("C:\WINDOWS\デスクトップ\Book1.xls")
Set wWorkSheets = wWorkBooks.Worksheets(1)
Set image1 = wWorkSheets.OLEObjects(1)
☆image1.Picture = LoadPicture("C:\04.jpg")
wExcel.Quit
Set wExcel = Nothing
Set wWorkBooks = Nothing
Set wWorkSheets = Nothing
Set wCheck = Nothing
------------------------------------------