I'd like to pass the argument: Workbooks(1).WorkSheets("Display #2"")
I'd like to assign the argument as follows but I know that won't work.
[VBA] ws = Workbooks(1).WorkSheets("Display #2"")
MyLastCell = LastCell(ws).Address(False,False)
[/VBA]
This function returns the last cell on a worksheet that I have implemented.
The function:
[VBA] Function Lastcell(ws as ???) as Range
Code
With ws
LastRow% = .cells.Find( more code
more code
End Function
[/VBA]
How do I define the argument so that I can Pass it???
The reason is I would like to use the function over different workbooks and sheets.
Any Help would be appreciated
Thanks