This is a vba code with an input box.if I run it and put a number then I will get the number of the sheets that I have put.the sheets will go before the active sheet.
Sub AddSheets()
Dim ShtCount As Integer, i As Integer
ShtCount = Application.InputBox("HOW MANY SHEETS DO YOU WANT TO ADD?", "NUMBER OF SHEETS", , , , , , 1)
If ShtCount = False Then
Exit Sub
Else
For i = 1 To ShtCount
Worksheets.Add
Next i
End If
End Sub
How can I modify the code so the sheets that will be added come after the active sheet?
Thank you in advance
Bookmarks