|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
设置了法人照片、门面照片、柜台照片插入表格的固定尺寸,可插入后图片超出表格设置尺寸了怎么办啊?
Sub 批量填充客户3项照片6()
'
Dim i As Integer
Dim fr As Integer
Dim mm As Integer
Dim gt As Integer
Dim zhenhao As Integer
For i = 1 To 3
zhenhao = i * 15 - 11
fr = i * 15 - 12
mm = i * 15 - 12
gt = i * 15 - 6
Range("t" & fr).Select
ActiveSheet.Pictures.Insert(ThisWorkbook.Path & "\" & Range("C" & zhenhao) & "FR.jpg").Select
With Selection.ShapeRange
.LockAspectRatio = msoTrue
.Height = 147
.Width = 88
End With
Range("y" & mm).Select
ActiveSheet.Pictures.Insert(ThisWorkbook.Path & "\" & Range("C" & zhenhao) & "MM.jpg").Select
With Selection.ShapeRange
.LockAspectRatio = msoTrue
.Height = 294
.Width = 440
End With
Range("y" & gt).Select
ActiveSheet.Pictures.Insert(ThisWorkbook.Path & "\" & Range("C" & zhenhao) & "GT.jpg").Select
With Selection.ShapeRange
.LockAspectRatio = msoTrue
.Height = 294
.Width = 440
End With
Next i
End Sub
|
|