I have a macro to allow users to add a country to a project. But it causes errors if they include spaces in the country name. I have instructed them not to include spaces, but of course someone always ignores that. Is there a way I can make the input box not accept spaces in the entry?
Code:
Sub AddCountry
Sheets("SiteTemplate").Visible = True
Sheets("SiteTemplate").Copy Before:=Sheets("SiteTemplate")
Range("A1") = InputBox("Country Name (no spaces)")
ActiveSheet.Name = Range("A1").Value
End Sub