Hi all,
I have some code that creates a new sheet and names it what ever the user enters into an InputBox.
It works when they enter a name.
It works when they click 'Cancel'.
But it returns a “Run-time error ‘9’@: Subscript out of range” error if you click OK without entering anything in the InputBox.
How do I stop it/loop it back after the ‘If Response = "" Then” section because it’s trying to create a sheet without a name!
I can't get my head around it! I'm trying to teach myself VBA but it's going very slowly.
![]()
Please Login or Register to view this content.
Bookmarks