ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select an item in a listbox using code (https://www.excelbanter.com/excel-programming/307703-select-item-listbox-using-code.html)

Fred Jacobowitz

Select an item in a listbox using code
 
Is it possible to select an item in a listbox using vba. I would like to
simulate the user clicking a row in a listbox? The listbox is not on a
'form' but rather on the spreadsheet. Does it matter?

Thank you,
Fred Jacobowitz



Tom Ogilvy

Select an item in a listbox using code
 

Sheet1.Listbox1.Listindex = 3

--
Regards,
Tom Ogilvy


"Fred Jacobowitz" wrote in message
...
Is it possible to select an item in a listbox using vba. I would like to
simulate the user clicking a row in a listbox? The listbox is not on a
'form' but rather on the spreadsheet. Does it matter?

Thank you,
Fred Jacobowitz





Fred Jacobowitz

Select an item in a listbox using code
 
Tom,
Works like a charm - thanks a lot!
"Tom Ogilvy" wrote in message
...

Sheet1.Listbox1.Listindex = 3

--
Regards,
Tom Ogilvy


"Fred Jacobowitz" wrote in message
...
Is it possible to select an item in a listbox using vba. I would like to
simulate the user clicking a row in a listbox? The listbox is not on a
'form' but rather on the spreadsheet. Does it matter?

Thank you,
Fred Jacobowitz








All times are GMT +1. The time now is 05:16 AM.

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