- 帖子
- 56
- 主題
- 8
- 精華
- 0
- 積分
- 81
- 點名
- 0
- 作業系統
- Window7
- 軟體版本
- OFFICE2010
- 閱讀權限
- 20
- 性別
- 男
- 註冊時間
- 2011-6-25
- 最後登錄
- 2016-1-17
|
測試使用此方法,發現一個問題
關於列高、欄寬與圖的尺寸有無固定比例
如oobird超版 .Height = 5.3 * 28.35 的28.35 換算公分
Sub Put_Picture_1()
On Error Resume Next
For i = 1 To 14
Rows(i).RowHeight = 40 '列高
Columns(12).ColumnWidth = 40 '欄寬
mm = Format(Cells(i, 11), "0")
Application.Cells(i, 12).Select
With ActiveSheet.Pictures.Insert(ThisWorkbook.Path & "\" & mm & ".jpg")
.LockAspectRatio = msoFalse
.Height = 5.3 * 28.35 ' 5.3 cm
.Width = 5.8 * 28.35 '5.8 cm
End With |
|