Dear All,
I have a Userform with a listbox. When I double click on a record on the listbox I trigger a line and the variable Targetline returns the number of the line selected.
Another userform opens and I can amend the data of this line. With the following code I write on the sheet:
Sheets("Due").Cells(TargetLine, 8) = DateValue(TextBox7.Value)
Unfortunately, when the sheet is filtered it does not work because Targetline has the value of the line of the listbox which does not correspond to the one on the sheet.
Any idea??
Thank you in advance
I have a Userform with a listbox. When I double click on a record on the listbox I trigger a line and the variable Targetline returns the number of the line selected.
Another userform opens and I can amend the data of this line. With the following code I write on the sheet:
Sheets("Due").Cells(TargetLine, 8) = DateValue(TextBox7.Value)
Unfortunately, when the sheet is filtered it does not work because Targetline has the value of the line of the listbox which does not correspond to the one on the sheet.
Any idea??
Thank you in advance