Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Set rngMax = Worksheets("Rap-ELC").Range("B2:B53")
Do you have values int B2:B53 of this worksheet? If it is returning zero then it is checking something. If your sheet name was misspelled you would get an error message. The code looks OK. "Bobby" wrote: Hi, Here is the situation: I use EXCEL 2003 If I apply the following it does not work: ------------------------------------------------------- Sub test() Dim maxnumber As Integer, rngMax As Range Sheets("Planif-max52").Select Set rngMax = Worksheets("Rap-ELC").Range("B2:B53") maxnumber = Application.WorksheetFunction.Max(rngMax) MsgBox maxnumber End Sub But this does with the ActiveSheet.Range -------------------- Sub test() Dim maxnumber As Integer, rngMax As Range Sheets("Planif-max52").Select Set rngMax = ActiveSheet.Range("B2:B53") maxnumber = Application.WorksheetFunction.Max(rngMax) MsgBox maxnumber End Sub P.S: The column is define as General Thank's ahead |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Not sure how to explain.... | Excel Discussion (Misc queries) | |||
Please explain | Excel Worksheet Functions | |||
How to explain??... | Excel Discussion (Misc queries) | |||
Let me see if I can explain this... | Excel Worksheet Functions | |||
Can someone explain to me? Pls? | Excel Programming |