Comparing Strings in VBA
I have a basic programming background and have been self sufficient for many years but this problem I can't seem to solve. I have a program in VBA and I need to compare two strings. I have tried using the following methods to compare my strings below but to no avail: //Assume Cells(1, 1).Value = "Cat" Dim A As String, B As String A="Cat" B=Cell(1, 1).Value If A=B Then... If A Like B Then... If StrCmp(A=B, 1)=0 Then... I've even tried inputting the Strings straight into the code to see if it would work: If "Cat" = "Cat" Then... If "Cat" Like "Cat" Then... If StrCmp("Cat" = "Cat", 1) Then... VBA