Hi Everyone,

I'm looking for information or links on how I could create my own method. I'm not referring to a UDF, but an actual method (or property I suppose). As a very simple example, I could write the following in excel vba:

[vba]Sub testSub()
Dim RG As Range, LRow As Long
Set RG = Range("B225")
LRow = TheLastRow(RG)
Msgbox LRow
End Sub

Public Function TheLastRow(Rng As Range) As Long
TheLastRow = Rng.Row + Rng.Rows.Count - 1
End Function[/vba]

But I was wondering how I could create a .LastRow method, so I could use:

[vba]LRow = RG.LastRow[/vba]

Note that I'm not really after a .LastRow method, but merely just using that as a very simple example. I'm assuming I'll need a normal VB program for this rather than VBA, and I wouldn't mind that as I'd like to pick up a copy anyways. Any help, or pointing me in the right direction, would be greatly appreciated!

Thanks
Matt