Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a problem using the find method of range object. It works fine if I
use into a Sub procedure; but fails (i.e. return nothing all time) if I use it into a Function. Image I have the following excel column (A1:A4): 10 20 30 40 the following sub is ok (the messagebox show A2): Sub FindTest() Dim R as Range Dim C as Range Set R = ActiveSheet.Range("A:A") Set C = R.Find(20,,xlValues) MsgBox C.Address End but the following function desn't work (C is always Nothing): Function FindTestFn() as Variant Dim R as Range Dim C as Range Set R = ActiveSheet.Range("A:A") Set C = R.Find(20,,xlValues) FindTestFn = C.Address End Thanks in advance... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Set range with Find method | Excel Discussion (Misc queries) | |||
Find Method problem in Excel VBA.... | Excel Worksheet Functions | |||
Problem is using any method of Range Object | Excel Programming | |||
AppActivate problem when called twice | Excel Programming | |||
How do I find which cell called a function? | Excel Programming |