|
Sub 按钮6_Click()
With Application.FileDialog(msoFileDialogFilePicker)
.InitialFileName = ThisWorkbook.Path & "\"
.Title = "请选择对应图片文件"
.AllowMultiSelect = True
.Filters.Clear
.Filters.Add "JPG文件", "*.jpg"
If .Show Then Set fs = .SelectedItems Else Exit Sub '
End With
For Each SHP In ActiveSheet.Shapes
If SHP.Type = 13 And SHP.Top > [A98].Top Then
SHP.Delete
End If
Next
Set Rng = [a98:af139]
t = [a97].Top + 20
l = [a97].Left + 20
For Each f In fs
ActiveSheet.Shapes.AddPicture f, msoFalse, msoCTrue, l, t, 85.03937, 113.4302
l = l + 85.03937 + 20
If l > Rng.Width - 105 Then
t = t + 20 + 113.4302
l = [a97].Left + 20
End If
Next f
End Sub
|
评分
-
2
查看全部评分
-
|