Hello All,
I have a user form that search columns and deletes the rows if the number in the textbox matches the number in Column B.
It's really simply and straight forward but it doesn't work!!!
I have written the same code in a test sheet using a cell instead of a textbox as the reference and it works - so I must be doing something wrong with specifying the textbox as a number.
[VBA]
Private Sub CommandButton1_Click()
'Main Task Hunt
x = Task_Deleter.TextBox1.Value
If Fix(x) - x = 0 Then
MainTask_Warning.Show
Exit Sub
Unload Me
End If
'Subtask Hunt
For j = 7 To 100
y = Task_Deleter.TextBox1.Value
Worksheets("Plan Overview").Select
If Activesheet.Cells(j, 2).Value = y Then
Rows(j).Delete
End If
Next j
End Sub
[/VBA]
Can someone tell me what I'm doing wrong because it is a real mystery to me!
Thanks in advance,
Max