View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Grant Reid Grant Reid is offline
external usenet poster
 
Posts: 51
Default Passing Arguments

Hi

I have a routine that calls a function to determine the last row in a range.
I need the function to return the last row number to the calling routine
which will place the number in the active cell.

Hope someone can help.

Sub LastRow()
FindLastRow ("A")
ActiveCell.Formula = ???????
End Sub

Public Function FindLastRow(cell) As String
Dim LastRow
LastRow = Range(cell & Rows.Count).End(xlUp).Row
End Function

Many Thanks - Grant