下面是插入圖片的代碼:123456789101112131415161718192021222324252627282930313233PrivateSubCommandButton1_Click()DimistrAsStringistr=Dir(ThisWorkbook.Path&"\Excel房型\*.jpg")DoWhileistr<>""n=n+1Cells(n,"A")=ThisWorkbook.Path&"\Excel房型\"&istristr=DirLoopEndSubPrivateSubCommandButton2_Click()DimssAsShapeForEachssInMe.Shapes'刪除除了命令按鈕之外的所有控件IfLeft(ss.Name,13)<>"CommandButton"Thenss.DeleteNextDimiAsLongFori=1To[a65536].End(3).RowIfCells(i,"A")=""ThenMsgBox"請先點擊“生成圖片路徑按鈕”。"ExitSubEndIf'下面的代碼插入圖片'路徑和文件名左邊上邊圖片寬度圖片高度Me.Shapes.AddPictureCells(i,"A").Value,True,True,[b1].Left,Cells(i,"B").Top,Cells(i,"B").ColumnWidth*6.2,Cells(i,"B").RowHeightNextEndSub
網站導航
- zblogPHP模板zbpkf
- zblog免費模板zblogfree
- zblog模板學習zblogxuexi
- zblogPHP仿站zbpfang