Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I am wondering how to do this, I need to have a macro look up the max value in column a on sheet2 and then give the total plus 1 in textbox1 I tried this but I cant get Private Sub UserForm_Activate() TextBox1.Value = Max(ActiveSheet.Range("a1:a50000") + 1) End Sub thanks Greg |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub UserForm_Activate()
TextBox1.Value = Application.Max(ActiveSheet.Range("a1:a50000") + 1) End Sub -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Greg B" wrote in message ... Hi all, I am wondering how to do this, I need to have a macro look up the max value in column a on sheet2 and then give the total plus 1 in textbox1 I tried this but I cant get Private Sub UserForm_Activate() TextBox1.Value = Max(ActiveSheet.Range("a1:a50000") + 1) End Sub thanks Greg |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for that Bob
Greg "Bob Phillips" wrote in message ... Private Sub UserForm_Activate() TextBox1.Value = Application.Max(ActiveSheet.Range("a1:a50000") + 1) End Sub -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Greg B" wrote in message ... Hi all, I am wondering how to do this, I need to have a macro look up the max value in column a on sheet2 and then give the total plus 1 in textbox1 I tried this but I cant get Private Sub UserForm_Activate() TextBox1.Value = Max(ActiveSheet.Range("a1:a50000") + 1) End Sub thanks Greg |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
TextBox1.Value = Application.Max(ActiveSheet.Range("a1:a50000") )+ 1
"Greg B" wrote: Hi all, I am wondering how to do this, I need to have a macro look up the max value in column a on sheet2 and then give the total plus 1 in textbox1 I tried this but I cant get Private Sub UserForm_Activate() TextBox1.Value = Max(ActiveSheet.Range("a1:a50000") + 1) End Sub thanks Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Query | Excel Discussion (Misc queries) | |||
another macro query - deleting a worksheet within a query | Excel Discussion (Misc queries) | |||
NEW WEB QUERY MACRO | Setting up and Configuration of Excel | |||
Query Macro | Excel Programming | |||
Macro with Query | Excel Programming |