Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Last Item of Listbox not getting displayed Raj Excel Discussion (Misc queries) 0 April 22nd 08 10:58 AM
Adding item in listbox volabos Excel Worksheet Functions 0 December 3rd 07 11:47 AM
Adding item in listbox volabos Excel Worksheet Functions 0 December 3rd 07 11:27 AM
Item order in ListBox [email protected] Excel Discussion (Misc queries) 1 June 16th 06 01:15 PM
The value of a ListBox Item TK Excel Programming 2 August 20th 04 06:17 AM


All times are GMT +1. The time now is 05:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"