If I understand your question right, you want to rewrite the functio
this way: (changes in bold)
sub test()
recct = wsreccount("sheet1")
msgbox recct
function wsreccount (wsname as *String*)
wsreccount = *Worksheets(wsname)*.UsedRange.Rows.Count
end function
---
using the Worksheets(String) property to choose a worksheet based on
name as string. You could also use
Activesheet.name
to get the current sheet's name, if you'd rather have this be variabl
per sheet
--
Message posted from
http://www.ExcelForum.com