Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code
Private Sub CommandButton1_Click() 'Extend range and sort project numbers Application.ScreenUpdating = False 'Keeps screen from updating thereby speeding Application.DisplayAlerts = False 'code execution Dim Project_Numbers As Range Application.GoTo Reference:="Project_Numbers" 'Check to see if the first record is blank Range("A11").Select If Range("A12") = "" Then Range("A12").Select End Else Set rng = Range("Project_Numbers") rng.Resize(rng.Rows.Count + 1).Name = "Project_Numbers" Selection.Sort Key1:=Range("A11"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Application.GoTo Reference:="Employee_Initials" MainMenu.Show End If End Sub This works fine if I am only adding one project at a time. but some times I might add 2 or more projects thanks in advance oldjay |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Expanding Range in Formula? | Excel Discussion (Misc queries) | |||
Expanding a named range | Excel Worksheet Functions | |||
Expanding a Range Automatically | Excel Discussion (Misc queries) | |||
expanding a range of numbers | Excel Discussion (Misc queries) | |||
Expanding Selection Range | Excel Programming |