MistakesWereMade
Board Regular
- Joined
- May 22, 2019
- Messages
- 103
I would like to store the cell range of a specific cell that has the same value as a cell from another sheet. Here is my code below.
I want my code to work where if the command button is clicked, it will delete a cell and shift up depend on if a checkbox is checked.
I want my code to work where if the command button is clicked, it will delete a cell and shift up depend on if a checkbox is checked.
Code:
Dim Val1 As Range
Private Sub CommandButton1_Click()
If TextBox1.Value = True Then
With Sheets("Inventory").Range("D3:D501")
Set Val1 = .Cell.Find(What:=Lookup!C3)
End With
Sheets("Inventory").Range("D3:D501").Delete Shift:=xlUp
End If
End Sub