Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a function in my module (see code below) that when I try and compile the module gives me the following compile error: "User-defined type not defined" Function Code: --------------------- Public Function GetLastRow(wrksheet As Sheet) As Long ' Use this function to find the last row (number) used Dim rng As Range Dim LastRow As Long 'Use a range on the sheet Set rng = Sheets(wrksheet).Range("B5:B500") ' Find the last row LastRow = Last(1, rng) GetLastRow = LastRow End Function --------------------------- I cannot figure out what's wrong with the above function declaration. Does anyone have a suggestion of what I'm doing wrong? Thanks, RocketDude |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
definition of a formula and function? | Excel Discussion (Misc queries) | |||
Extracting Error bar definition | Charts and Charting in Excel | |||
How do you return current ROW number to definition in NAME function? | Setting up and Configuration of Excel | |||
Definition of a statistical function (CQC) in Excel (maybe with VBA...) | Excel Programming | |||
Definition of a statistical function (CQC) in Excel | Excel Worksheet Functions |