straightreps
01-01-2016, 06:05 PM
I have this form control button and it stops on the IF InStrExact statement, this is going to be used on a mac, works on my pc, but not mac
Sub Button38_Click()
Dim SearchThis As String, Cell As Range
ActiveSheet.Unprotect Password:="123"
SearchThis = InputBox("Type Number.", "Property Search")
For Each Cell In Intersect(Range("a:a,d:d"), ActiveSheet.UsedRange)
If InStrExact(1, Cell.Value, SearchThis) Then
Cell.Select
Exit For
End If
Next
ActiveSheet.Protect Password:="123"
End Sub
Sub Button38_Click()
Dim SearchThis As String, Cell As Range
ActiveSheet.Unprotect Password:="123"
SearchThis = InputBox("Type Number.", "Property Search")
For Each Cell In Intersect(Range("a:a,d:d"), ActiveSheet.UsedRange)
If InStrExact(1, Cell.Value, SearchThis) Then
Cell.Select
Exit For
End If
Next
ActiveSheet.Protect Password:="123"
End Sub