G
Guest
Guest
Hello people
I am trying to do a search function however, a line of my code
Loop Until f.Offset(0, 0) = g.Offset(0, -1) Or f = ""
gave me an error message(no set variable or with block variable)
I couldn't figure out how to solve this problem
please help
Thank you
The following is part of the code
If f.Address = g.Offset(0, -1).Address Then
f.Activate:
Unload Me
Else
Do
Set f = Columns(3).FindNext(After:=f)
Loop Until f.Offset(0, 0) = g.Offset(0, -1) Or f = ""
If f.Address = g.Offset(0, -1).Address Then
MsgBox f.Address:
MsgBox g.Address:
f.Activate:
Unload Me
Else
MsgBox "No Data"
End If
End If
I am trying to do a search function however, a line of my code
Loop Until f.Offset(0, 0) = g.Offset(0, -1) Or f = ""
gave me an error message(no set variable or with block variable)
I couldn't figure out how to solve this problem
please help
Thank you
The following is part of the code
If f.Address = g.Offset(0, -1).Address Then
f.Activate:
Unload Me
Else
Do
Set f = Columns(3).FindNext(After:=f)
Loop Until f.Offset(0, 0) = g.Offset(0, -1) Or f = ""
If f.Address = g.Offset(0, -1).Address Then
MsgBox f.Address:
MsgBox g.Address:
f.Activate:
Unload Me
Else
MsgBox "No Data"
End If
End If