Sub 新增數量()
Dim Rng As Range
Set Rng = Rows("1:47")
Rng.Copy
With Rows("48:48").Resize(, Rng.Rows.Count) 'columns/rows
.PasteSpecial Paste:=xlPasteFormats '格式
.PasteSpecial Paste:=xlPasteValuesAndNumberFormats '值
.PasteSpecial Paste:=xlPasteFormulasAndNumberFormats '公式
End With
End Sub作者: jackson7015 時間: 2016-6-7 14:58
For Each p In R_指定範圍.Parent.Pictures
x1 = p.Left
x2 = p.Left + p.Width
y1 = p.Top
y2 = p.Top + p.Height
xx = x1 >= R_x1 And x1 <= R_x2 Or x2 >= R_x1 And x2 <= R_x2
yy = y1 >= R_y1 And y1 <= R_y2 Or y2 >= R_y1 And y2 <= R_y2
If xx And yy Then
p.Delete
End If
Next
End Sub作者: jackyq 時間: 2016-6-8 17:52
方法2
Sub 新增數量_2()
插入次數 = 5
Set R_Copy = Rows("1:47")
Set R_Insert = Rows("48:48")
Application.CutCopyMode = False
R_Insert.Resize(插入次數 * R_Copy.Rows.Count).Insert
R_Copy.Select
R_Copy.Copy
Set R_Insert = R_Insert.Offset(-R_Copy.Rows.Count * 插入次數)
For w = 1 To 插入次數
R_Insert.PasteSpecial
Set R_Insert = R_Insert.Offset(R_Copy.Rows.Count)
Next
End Sub作者: ML089 時間: 2016-6-9 00:19
Sub 新增數量()
Dim Rng As Range
Application.DisplayAlerts = False
Set Rng = Rows("1:47")
Rng.Copy
Rows("48:48").Resize(, Rng.Rows.Count).PasteSpecial Paste:=xlPasteAll
Application.DisplayAlerts = True
End Sub作者: jackson7015 時間: 2016-6-14 15:58