Function still isn't working???
Posted by Tim on January 02, 2002 1:09 PM
I posted this message the other day and got a response that didn't work. The following is the code for my Function:
Function GetBalance(ID)
Sheets("ExportAmort").Activate
Set r = Sheets("ExportAmort").Range("g10").CurrentRegion
GetBalance = Application.WorksheetFunction.VLookup(ID, r, 6, 0)
End Function
If I set the range as g10:bb128, for example, instead of using CurrentReqion, it works. It is something with the CurrentRegion function that doesn't work. When I write a small procedure using the same range defintion, it selects the correct range. So, there is something wrong with the combination of Current Region in this Function.
Help!
Tim.