|
- 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 = msoAutoShape Then
- shp.Delete
- End If
- Next
- myPath = ThisWorkbook.Path & ""
- myName = Dir(myPath & "*.jpg")
- ML = 54.75
- MT = 78.75
- MW = 277.5
- MH = 127.5: jg = 15.75
- Do While myName <> ""
- n = n + 1
- If n > 3 Then n = 1: MT = MT + MH + jg: ML = 54.75
- ML = n * MW - 222.75
- ActiveSheet.Shapes.AddShape(msoShapeRectangle, ML, MT, MW, MH).Select
- Selection.ShapeRange.Fill.UserPicture myPath & myName
- myName = Dir
- Loop
- Application.ScreenUpdating = True
- [a1].Select
- If Err.Number <> 0 Then Err.Clear: On Error GoTo 0
- End Sub
复制代码 |
|