Hi,
Apologies i am quite inexperianced with VB and mainly use this forum to put together my code.
I have created a userform with a text box and command button.
I want the user to be able to enter a row number (say 10) in the text box and when the click the command button the rows between 2 - 10 are deleted.
Here is what i have so far. obviously is does not work.
Private Sub CMDpurge_Click()
Dim a As Integer
With Worksheets("Jobs")
a = TXTpurge.Value
Rows("2:a").Select
Selection.Delete
End With
TXTpurge.Value = ""
End Sub
Your help is much appreciated
Thanks
MrGJEB
Apologies i am quite inexperianced with VB and mainly use this forum to put together my code.
I have created a userform with a text box and command button.
I want the user to be able to enter a row number (say 10) in the text box and when the click the command button the rows between 2 - 10 are deleted.
Here is what i have so far. obviously is does not work.
Private Sub CMDpurge_Click()
Dim a As Integer
With Worksheets("Jobs")
a = TXTpurge.Value
Rows("2:a").Select
Selection.Delete
End With
TXTpurge.Value = ""
End Sub
Your help is much appreciated
Thanks
MrGJEB