'声明
Private xlApp as Excel.Application
Private xlBook as Excel.Application
Private xlSheet as Excel.Application
Private xlShage as Excel.Shape'代码
Set xlApp=CreateObject("Excel.Application")
Set xlBook=xlapp.Workbooks.Add
Set xlSheet=xlBook.Worksheets(1)
Set xlShape=xlSheet.Shapes.AddPicture("C:\WINNT\Sample.bmp, _
    True,True,100,100,70,70)

解决方案 »

  1.   

    '声明
    Private xlApp as Excel.Application
    Private xlBook as Excel.Application
    Private xlSheet as Excel.Application
    Private xlShape as Excel.Shape'代码
    Set xlApp=CreateObject("Excel.Application")
    Set xlBook=xlapp.Workbooks.Add
    Set xlSheet=xlBook.Worksheets(1)
    Set xlShape=xlSheet.Shapes.AddPicture("C:\WINNT\Sample.bmp, _
        True,True,100,100,70,70)
      

  2.   

    '声明
    Private xlApp as Excel.Application
    Private xlBook as Excel.Application
    Private xlSheet as Excel.Application
    Private xlShape as Excel.Shape'代码
    Set xlApp=CreateObject("Excel.Application")
    Set xlBook=xlapp.Workbooks.Add
    Set xlSheet=xlBook.Worksheets(1)
    Set xlShape=xlSheet.Shapes.AddPicture("C:\WINNT\Sample.bmp, _
        True,True,100,100,70,70)