Hi Kashizzz,
One way:
Function LastCell(strWSName As String) As Range
Dim ws As Worksheet
Set ws = Worksheets(strWSName)
'your code
End Function
---
Regards,
Norman
"Kashizzz " wrote in message
...
Hi,
I have the following function requiring ws as a worksheet...
Code:
--------------------
Function LastCell(ws As Worksheet)
...
End Function
--------------------
This works fine if I call it using Sheet1, Sheet2,...
I want to pass worksheet tab names to the function. Is it possible?
Regards
---
Message posted from http://www.ExcelForum.com/