I'm working on a simple program that lets the user enter, edit and
print the data. I developed the program using Microsoft Excel 2003 with
VBE.
Under the Edit button I want to enable the user to
edit the existing data and save as well as to save as another name.
To delete the data in the worksheets, I used this code:
But, the problem is that how can I delete the data that correspond to another 2 values?
Example:
To delete a data, the user need to first enter the SpecNo and IssueNo. Only then, the user can enter the component to be deleted.
The system need to first recognize the SpecNo and IssueNo, as to find the component.
Any ideas?
Thanks in advanced
print the data. I developed the program using Microsoft Excel 2003 with
VBE.
Under the Edit button I want to enable the user to
edit the existing data and save as well as to save as another name.
To delete the data in the worksheets, I used this code:
Code:
Private Sub CommandButton2_Click()
Dim MyDel As String
MyDel = InputBox("Delete?")
For i = Range("a1:a10000").Count To 1 Step -1
If Cells(i + 1, "a") = MyDel Then
Cells(i + 1, "a").EntireRow.delete
End If
Next i
End Sub
But, the problem is that how can I delete the data that correspond to another 2 values?
Example:
To delete a data, the user need to first enter the SpecNo and IssueNo. Only then, the user can enter the component to be deleted.
The system need to first recognize the SpecNo and IssueNo, as to find the component.
Any ideas?
Thanks in advanced