I think that ActiveSheet.UsedRange will give you the range. Therefore you can use a formula like
=MyFunction() without parameter.
The function is, for example:
Public Function MyFunction() As String Application.Volatile True Dim ws As Worksheet Set ws = ActiveSheet Dim r As Range Set r = ws.UsedRange '. . . perform calculations and return the result . . . MyFunction = "the result" End Function