cliffton jhed saldavia
asked on
How delete specific row/data in excel by userform.
Private Sub TextBox1_Change()
Find = Val(Me.TextBox1.Value)
c = Application.WorksheetFunct ion.CountI f(Sheet1.R ange("B:B" ), Find)
If c = 0 Then
EMPNO.Text = ""
r = Application.WorksheetFunct ion.Match( Find, Sheet1.Range("B:B"), 0)
Me.EMPNO.Value = Sheet1.Range("B" & r).Value
Me.QIDNO.Value = Sheet1.Range("C" & r).Value
Me.LNAME.Value = Sheet1.Range("D" & r).Value
Me.FNAME.Value = Sheet1.Range("E" & r).Value
Me.Image1.Picture = LoadPicture(Worksheets("Sh eet1").Ran ge("AZ" & r)
These are the codes that ive been using to pull up the data from sheets1 to userform1.I just wanna ask if how can I also delete the displayed data in my userform,that corresponds to data in excel sheeT?
Hope you can provide me the best answer.I really appreciate those who can.
Find = Val(Me.TextBox1.Value)
c = Application.WorksheetFunct
If c = 0 Then
EMPNO.Text = ""
r = Application.WorksheetFunct
Me.EMPNO.Value = Sheet1.Range("B" & r).Value
Me.QIDNO.Value = Sheet1.Range("C" & r).Value
Me.LNAME.Value = Sheet1.Range("D" & r).Value
Me.FNAME.Value = Sheet1.Range("E" & r).Value
Me.Image1.Picture = LoadPicture(Worksheets("Sh
These are the codes that ive been using to pull up the data from sheets1 to userform1.I just wanna ask if how can I also delete the displayed data in my userform,that corresponds to data in excel sheeT?
Hope you can provide me the best answer.I really appreciate those who can.
ASKER
what i mean is that.I want to delete the data in a sheet in excel.
ASKER
Sir thank you so much for the share I'll gonna try this one.
Let me know if you need further help.
ASKER
thanks you so much sir I really appreciate your help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Mr Roy Cox already provided the best solution.Thank you so much
Pleased to help
ASKER
sir by the way I do have another question.This is a different question.Try to check it.
I think I've already commented there and asked for an example workbook
It's not a good idea to use the TextBox change event to make changes to the sheet
Take a look at this example
DataBaseForm.xlsm