I
Irmann
I have a problem about using find method in Excel VBA.
Here is my program:-
_________________________________________________________________
Private Sub CommandButton2_Click()
Dim MyProduct As Range
Product = Range("F8").Value
Set MyProduct =
ThisWorkbook.Sheets("Sheet2").Columns("E").Find(what:=Client,
LookAt:=xlWhole)
ActiveSheet.Cells(8, 8).Value = MyProduct.Columns("G").Value
End Sub
_____________________________________________________________________
Object variable or With block variable not set
Here is my program:-
_________________________________________________________________
Private Sub CommandButton2_Click()
Dim MyProduct As Range
Product = Range("F8").Value
Set MyProduct =
ThisWorkbook.Sheets("Sheet2").Columns("E").Find(what:=Client,
LookAt:=xlWhole)
ActiveSheet.Cells(8, 8).Value = MyProduct.Columns("G").Value
End Sub
_____________________________________________________________________
MyClient.Columns("G").Value ' , give me error... Run-time error '91'how can I pull data at Columns(G) to Cells(8,8)
the program I wrote ' ActiveSheet.Cells(8, 8).Value =
Object variable or With block variable not set