Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a small range of cells to delete
This is a portion of code where I am using a listbox selection to find a
person in a list. The last line here is where I keep getting stuck. After I find the person and move to the right, I want to select the cell I am on plus two cells to the right so I can delete them. I've looked up as much as I can in help and examples here but nothing seems to work for me. Can anyone assist? Private Sub CommandButton3_Click() Dim Remove As Object 'Remove on Employee Training Sheet Set Remove = Worksheets("Keys").Range("L19") If Remove < "" Then Range("L19").Select Selection.Copy Range("B3").Select Cells.Find(What:=Remove, After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate Else MsgBox ("No one is selected") End If ActiveCell.Offset(0, -1).Select Range(ActiveCell.Offset(0, 3)).Select -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200802/1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting a range of cells, how to ? | Excel Programming | |||
Selecting a range of cells , how to ? | Excel Programming | |||
Selecting a range of cells, how to ? | Excel Worksheet Functions | |||
Delete cells without selecting? | Excel Programming | |||
Selecting a Range of cells in VBA | Excel Programming |