Microsoft2007..
I am a fairly new user of VBA.
How would I add a sheet a report and then add an input box to rename it.
You didn't give me any clues about what sort of sheet needed to be added - so I've assumed a blank worksheet
Sub workbookadder() On Error GoTo retry Dim mysht As Worksheet Set mysht = Worksheets.Add reinput: mysht.Name = InputBox("Please type the name for this sheet") Exit Sub retry: MsgBox "That name either already exists or is not allowed. Please retry" GoTo reinput End Sub
Advertisement