- 帖子
- 4901
- 主題
- 44
- 精華
- 24
- 積分
- 4916
- 點名
- 119
- 作業系統
- Windows 7
- 軟體版本
- Office 20xx
- 閱讀權限
- 150
- 性別
- 男
- 來自
- 台北
- 註冊時間
- 2010-4-30
- 最後登錄
- 2025-5-17
               
|
2#
發表於 2013-5-6 21:47
| 只看該作者
回復 1# cmo140497 - Sub test()
- Dim Pc As Picture, w#, k#, t#, h#
- Application.ScreenUpdating = False
- 工作表1.Pictures.Copy
- With 工作表2
- .Pictures.Delete
- w = .[AY2].Left + .[AY2].Width
- k = .[B2].Left
- t = .[B2].Top
- .Paste
- For Each Pc In .Pictures
- With Pc
- k = IIf(k + .Width > w, .Parent.[B2].Left, k)
- t = IIf(k = .Parent.[B2].Left, t + h, t)
- .Top = t
- .Left = k
- h = IIf(h < .Height, .Height, h)
- h = IIf(k = .Parent.[B2].Left, .Height, h)
- k = k + .Width
- End With
- Next
- .[B2].Select
- End With
- Application.ScreenUpdating = True
- End Sub
複製代碼 |
|