PDA

View Full Version : Search button



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

mikerickson
01-02-2016, 01:02 AM
Change InStrExact to InStr

This is continuation of http://www.mrexcel.com/forum/excel-questions/911541-excel-mac-but-i-am-pc-2.html

Aussiebear
01-02-2016, 02:01 AM
Oh dear yet another cross poster.... its such a small world.

SamT
01-02-2016, 12:24 PM
Please read this link, then post links here to other places you have posted this question. Thanks.

http://www.excelguru.ca/content.php?184