MS-Office/Excel-VBA/Paginas copieren.vba

17 lines
No EOL
425 B
Text

Sub Copysheet()
Dim i As Integer
Dim p As Integer
On Error GoTo out
i = InputBox("Hoeveel?", "Making Copies")
Application.ScreenUpdating = False
p = 0
Do
ActiveSheet.Copy After:=Sheets(Sheets.Count)
p = p + 1
Loop Until p = i
Application.ScreenUpdating = True
Exit Sub
out:
MsgBox "geanuleerd"
Application.ScreenUpdating = True
End Sub