Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim sNewname As String
sNewname = "" Do While sNewname = "" sNewname = InputBox("Enter initials for new person:") If sNewname = "" Then iSvar = MsgBox("Do you want to quit?", vbYesNo) If iSvar = vbYes Then Exit Do End If Loop Range("C2").CurrentRegion.Select Do Until ActiveCell.Value = "" ActiveCell.Offset(1, 0).Activate Loop ActiveCell.Value = sNewname Dim sAddr As String sAddr = ActiveCell.Address MsgBox sAddr ActiveWorkbook.Names("ansvar").Delete ActiveWorkbook.Names.Add Name:="ansvar", RefersTo:="=Lister!$c$1:" sAddr Range("C2").CurrentRegion.Select Selection.Sort Key1:=Range("C2"), Order1:=xlAscending Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom _ DataOption1:=xlSortNorma -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Naming a range | Excel Discussion (Misc queries) | |||
Range naming | Excel Discussion (Misc queries) | |||
Naming a range | Excel Programming | |||
Range naming | Excel Programming | |||
Naming a Range with VB | Excel Programming |