Sub 複製工作表()
Dim i As Integer
Dim no As Integer
Dim e As Integer
i = Application.InputBox("請輸入數字" & Chr(10) & "或按 '取消' 停止巨集", _
"複製工作表張數", Type:=1)
If i > 0 Then
e = i
For no = 1 To i
Worksheets("sample").Copy before:=Worksheets(1)
Sheets(1).Name = e
e = e - 1
Next no
End If
End Sub作者: GBKEE 時間: 2012-3-29 18:05