Private Sub Command1_Click() Dim xlApp As New Excel.Application Dim xlBook As Excel.Workbook Dim xlSheet As Excel.Worksheet Set xlBook = xlApp.Workbooks().Add Set xlSheet = xlBook.Worksheets("sheet1") ActiveSheet.Pictures.Insert("F:\aaa.bmp").Select xlApp.Visible = True End Sub
工具》宏》录制》操作》查看》vba转化成vb就好了
xlsheet.Range("B5").Select();
xlsheet.Pictures.insert(path).Select();
xlsheet.Pictures.insert(path).Select
Dim xlApp As New Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Set xlBook = xlApp.Workbooks().Add
Set xlSheet = xlBook.Worksheets("sheet1")
ActiveSheet.Pictures.Insert("F:\aaa.bmp").Select
xlApp.Visible = True
End Sub
1,382, 372, 412 起始坐标,宽高
不受单元限制