jimmisavage
Board Regular
- Joined
- Jun 28, 2017
- Messages
- 130
Hi,
I'm trying to find a row based on a combobox1. It's working on one sheet, but not on another - on the other sheet it seems to delete the column below the one i'm expecting. Can anyone shed some light on why this might happen?
I'm trying to find a row based on a combobox1. It's working on one sheet, but not on another - on the other sheet it seems to delete the column below the one i'm expecting. Can anyone shed some light on why this might happen?
Code:
Private Sub CommandButton2_Click() Sheets("Study Database").Select
Columns("B:B").Select
Cells.Find(What:=ComboBox1.Value, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Select
Rows(ActiveCell.Row).EntireRow.Delete
Range("A1").Select
'next
Sheets("Study Snapshot").Select
Columns("E:E").Select
Cells.Find(What:=ComboBox1.Value, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Select
Rows(ActiveCell.Row).EntireRow.Delete
Range("A1").Select
Sheets("Admin").Select
Unload Me
End Sub