Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Explicit
- Private Sub CommandButton2_Click()
- Dim r1 As Range
- Set r1 = Range("Sheet3!A2:A" & Range("A" & Rows.Count).End(xlUp).Row)
- For Each C1 In r1
- If C1.Value = ListBox1.Value Then
- C1.Font.Bold = True
- With C1
- C1.EntireRow.Delete
- End With
- End If
- Next C1
- End Sub
- Sub UserForm_Initialize()
- Range("A2").Select
- End Sub
- Private Sub CommandButton1_Click()
- If TextBox1.Value = "" Then
- MsgBox ("Please Add the component name")
- Else
- ActiveCell = TextBox1.Value
- ActiveCell.Offset(1, 0).Select
- ListBox1.RowSource = "Sheet3!A2:A" & Range("A" & Rows.Count).End(xlUp).Row
- Call resetForm
- End If
- End Sub
- Sub resetForm()
- TextBox1.Value = ""
- TextBox1.SetFocus
- End Sub
Add Comment
Please, Sign In to add comment