Remove data from column
Insert a UserForm to your VBA Project. Put a ComboBox and a
CommandButton on the UserForm.
Add the following code to the UserForm:
Private mRng As Range
Private Sub CommandButton1_Click()
mRng(ComboBox1.ListIndex + 1).Delete
ComboBox1.ListIndex = -1
ComboBox1.Clear
UserForm_Initialize
End Sub
Private Sub UserForm_Initialize()
Set mRng = Sheets("Cat Picklist").Range(Cells(2, "a"), Cells(2,
"a").End(xlDown))
For Each c In mRng
ComboBox1.AddItem c
Next c
End Sub
Add the following to the module with Sub NewCategory:
Sub DeleteCategory()
UserForm1.Show
End Sub
Hope that helps.
|