ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Positioning the selected row in a listbox (https://www.excelbanter.com/excel-programming/424877-positioning-selected-row-listbox.html)

Nicola M

Positioning the selected row in a listbox
 
Hi all! Excel 2003.

Here my trouble. I have a Listbox. I add it items and select the proper item
programatically. Unfortunately my selected row is always the last visible
row. I'd like that this selected row (it is the current date) be showed as
the second so I have yesterday as the first visible row and the day after
tomorrow as the third row.
Is there a way to get this?

Thank you in advance for any tips and suggestions.
Nicola M

Bob Umlas, Excel MVP

Positioning the selected row in a listbox
 
Set the listindex to 1 to get the 2nd item (0 gets the first, -1 deselects
all, etc)

"Nicola M" wrote:

Hi all! Excel 2003.

Here my trouble. I have a Listbox. I add it items and select the proper item
programatically. Unfortunately my selected row is always the last visible
row. I'd like that this selected row (it is the current date) be showed as
the second so I have yesterday as the first visible row and the day after
tomorrow as the third row.
Is there a way to get this?

Thank you in advance for any tips and suggestions.
Nicola M



All times are GMT +1. The time now is 10:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com