Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
You want to pass the worksheet name as argument, so the function argument is a string. Function LastCell(ws As Stringt) worksheets(ws).range( ;;;) End Function call the function return = LastCell(sheet1.name) or return = LastCell("YOUR sheet name") or return = LastCell(worksheets("YOUR sheet name").name) Regards JY "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/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Passing a UDF as an argument to a UDF | Excel Discussion (Misc queries) | |||
Need help passing an array as an argument | Excel Programming | |||
Passing range as argument | Excel Programming | |||
Passing an argument to a quote | Excel Programming | |||
Passing an argument to a quote | Excel Programming |