Worksheet varaible

How to pass worksheet variable to VBA functions(worksheet as argument) using execute macro…

Please help…

Try this

Yes…I can pass Integer,String in to the function…but below is the issue…

Public Function FindLastRowUsedRange(ByVal Sheetname As Worksheet) As Long

On Error Resume Next
FindLastRowUsedRange = Sheetname.UsedRange.Cells(Rows.count, 1).End(xlUp).Row
On Error GoTo 0
Exit Function

End Function