Terry_Orange
Board Regular
- Joined
- Jul 22, 2002
- Messages
- 133
In Excel certain characters are not allowed to be used in the name of a worksheet.
for example
: / ? * [ or ]
I have text inputbox and this is used as the value for the worksheet that is created on the fly.
I was hoping to use something like INSTR ...
Dim ssstring As String
ssstring = "/"
If InStr(0, UserForm1.tBox1.Value, ssstring) = 0 Then
'do nothing
Else
MsgBox ("Please don't use / ? * [ or ]")
End If
But Excel doesn't like this. Has anyone had this problem before and solved it ??? What solutions can anyone suggest ??? How do you use INSTR (is it because I'm using a single character and not a string ?).
Thank you
TO.
for example
: / ? * [ or ]
I have text inputbox and this is used as the value for the worksheet that is created on the fly.
I was hoping to use something like INSTR ...
Dim ssstring As String
ssstring = "/"
If InStr(0, UserForm1.tBox1.Value, ssstring) = 0 Then
'do nothing
Else
MsgBox ("Please don't use / ? * [ or ]")
End If
But Excel doesn't like this. Has anyone had this problem before and solved it ??? What solutions can anyone suggest ??? How do you use INSTR (is it because I'm using a single character and not a string ?).
Thank you
TO.