Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Aplication.Worksheetfunction.MAX() Stopped Working
Greetings,
I have an invoice number generator on a UserForm run from a CommandButton. Here is the code: Dim rIN1 As Range Dim rIN2 As Range ThisWorkbook.Activate Set rIN1 = Range("rInvNums_1st") Set rIN2 = Range("rInvNums_List") Input_1.Value = Application.WorksheetFunction.Max(rIN1, rIN2) + 1 With the named range "rInvNums_1st" equal to 3311000 (The first possible invoice number minus 1) and the named range "rInvNums_List" equal to the numbers in column C, (the list of existing invoice numbers). This should produce the number 3311001 for the first invoice number, instead it is producing the number 1! When I check it with debug, debug shows the value of rIN1 as 3311000 and did not show anything for rIN2. Anyone have any ideas as to what is wrong with this code? Any help is greatly appreciated. Thanks. -Minitman |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
WorksheetFunction not working correctly | Excel Discussion (Misc queries) | |||
Add-in stopped working | Excel Programming | |||
VB Stopped Working | Excel Worksheet Functions | |||
How do I open an aplication and run a file in that aplication use. | Excel Programming | |||
Tab stopped working | Excel Programming |