tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,913
- Office Version
- 365
- 2019
- Platform
- Windows
Why does this work:
but this fails?
EDIT SORTED:
Thanks
Code:
If Sheet1.Cells(1,1).Value Like "a*" Then MsgBox "Starts with a"
but this fails?
Code:
Select Case Sheet1.Cells(1,1).Value
Case Like "a*"
Msgbox "Starts with a"
Case Else
Msgbox "Doesn't"
End Select
EDIT SORTED:
Code:
Select Case Sheet1.Cells(1,1).Value Like "a*"
Case True
Msgbox "Starts with a"
Case Else
Msgbox "Doesn't"
End Select
Thanks
Last edited: