Listbox Targetline

miami2k

Board Regular
Joined
Nov 1, 2017
Messages
58
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
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
I've found the solution myself adding a column with an additional field that I've called ID and identifies each row.
 
Upvote 0

Forum statistics

Threads
1,214,849
Messages
6,121,922
Members
449,056
Latest member
denissimo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top