|
- Sub lqxs()
- Dim rng As Range, ML, MT, MW, MH, shp As Shape, n%, jg
- On Error Resume Next
- Sheet1.Activate
- For Each shp In ActiveSheet.Shapes
- If shp.Type = 1 Or shp.Type = 13 Then
- shp.Delete
- End If
- Next
- ML = 54.75: MT = 78.75: MW = 277.5: MH = 127.5
- With Application.FileDialog(msoFileDialogOpen)
- .AllowMultiSelect = True
- .Show
- For i = 1 To .SelectedItems.Count
- filenm = .SelectedItems(i)
- myName = Dir(filenm)
- If myName <> "" Then
- n = n + 1
- If n > 3 Then n = 1: MT = MT + MH: ML = 54.75
- ML = n * MW - 222.75
- ActiveSheet.Shapes.AddShape(msoShapeRectangle, ML, MT, MW, MH).Select
- Selection.ShapeRange.Fill.UserPicture myPath & myName
- End If
- Next
- End With
- Application.ScreenUpdating = True
- [a1].Select
- If Err.Number <> 0 Then Err.Clear: On Error GoTo 0
- End Sub
复制代码 |
|