Max WorksheetFunction
Hi
this works fine for me. what error did you get?
does the sheet 'sheet1' exist??
--
Regards
Frank Kabel
Frankfurt, Germany
solo wrote:
I have a sub that looks like the one below but it gives me an error
when I try to run it, it compiles fine and I cannot seem to know
whats wrong.
sub FindMax()
Dim VarMaxVal As Variant
VarMaxVal = 0
Dim myRange As Range
Set myRange = Worksheets("Sheet1").Range("T7:T64")
VarMaxVal= Application.WorksheetFunction.Max(myRange)
End Sub
|