1) Add this function to your module, it does what it says it does, you can see in the code where you list the character to remove:
Function removeSpecial(sInput As String) As String
Dim sSpecialChars As String, i As Long
sSpecialChars = "\/:*?™""®<>|.&@#(_+`©~);-+=^$!,'" 'This is your list of characters to be removed
For i = 1 To Len(sSpecialChars)
sInput = Replace$(sInput, Mid$(sSpecialChars, i, 1), "") 'this will remove spaces
Next
removeSpecial = sInput
End Function
2) Amend your code to use that function, as well as select the first 30 character, or 29, whatever you want:
Sheets(Sheets.Count).Name = Left(removeSpecial(projectCell.Value), 30) ' Renames the worksheets from the index of project.
Bookmarks