A simple "find" syntax question

BACK2BASIC

New member
Joined
Oct 14, 2013
Messages
25
Reaction score
0
Points
0
Please help me to understand what is wrong with my code syntax in blue below? I only want to search Column D for the contents of WR. I know it is syntax but I just do not know VBA well enough to know what is wrong with it. Thank you in advance.



Code:
Dim WR as string
Dim WRwhole As String

WR = Right(WRwhole, 7) ' Take the left most 7 characters from the job number
               
[COLOR=#0000ff]        Set GCell = ActiveSheet.Range("$D$1").Select.EntireColumn.Find(WR)[/COLOR]
 
I'd use:

Code:
Sub M_snb()
   with activesheet.columns(4).find(left(Jobnumber,7))
      x0=.address
   end with 
End Sub


 
Back
Top