Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Irmann,
Your line ActiveSheet.Cells(8, 8).Value = MyProduct.Columns("G").Value uses relative addresssing (this part, psecifically: MyProduct.Columns("G").Value) , which means that the code will pull the value from 7 columns to the right of MyProduct (a cell in column E) - so the value is from column K. If you really want the value from column G, then use ActiveSheet.Cells(8, 8).Value = MyProduct.Offset(0,2).Value HTH, Bernie MS Excel MVP "Irmann" wrote in message ... 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(wh at:=Client, LookAt:=xlWhole) ActiveSheet.Cells(8, 8).Value = MyProduct.Columns("G").Value End Sub __________________________________________________ ___________________ how can I pull data at Columns(G) to Cells(8,8) the program I wrote ' ActiveSheet.Cells(8, 8).Value = MyClient.Columns("G").Value ' , give me error... Run-time error '91' Object variable or With block variable not set What does it mean? Please someone help me to solve this problem.... -- Irmann |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Please post this thread a correct full method, method about | New Users to Excel | |||
Object property/method problem | Excel Discussion (Misc queries) | |||
How do you find the method of selected points? | Setting up and Configuration of Excel | |||
How to find method to cut steel coil by using excel. | Excel Worksheet Functions | |||
problem with the command - method "UpdateFromFile" | Excel Worksheet Functions |