Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your replies folks....
The issue was that the LastCell function needed ws to be passed as a worksheet object. Excel expects the name of the sheet, (which is defaulted as Sheet1 fo the first, Sheet2 for the second and so on, and found under Projec Explorer (Ctrl+R) - Properties (F4)- ) under (Name). I passed the object using the following code: Code ------------------- Worksheets("SheetName").Activate LastRow = LastCell(ActiveSheet).Ro ------------------- ...and this worked!!! 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 |