Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Selecting a listbox item event

Hey

I want to have a code run when a user selects any item in my listbox
(Listbox1). How can I make this happen?


Thanks
Todd Huttenstine

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Selecting a listbox item event

Get the Listbox_Click event.

--
HTH

Bob Phillips

"Todd Huttenstine" wrote in message
oups.com...
Hey

I want to have a code run when a user selects any item in my listbox
(Listbox1). How can I make this happen?


Thanks
Todd Huttenstine



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Selecting a listbox item event

Assuming it's a listbox on a worksheet, then right-click on it in
design mode and select 'view code' from the context menu. That will
launch the VBA IDE and create a Listbox1_Change event procedure.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Selecting a listbox item event

You need to use the Click event of the ListBox. E.g.,

Private Sub ListBox1_Click()
MsgBox "You clicked: " & Me.ListBox1.Value
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Todd Huttenstine" wrote
in message
oups.com...
Hey

I want to have a code run when a user selects any item in my
listbox
(Listbox1). How can I make this happen?


Thanks
Todd Huttenstine



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
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
Selecting an Item from a List and getting a different item to pop. Matt Excel Worksheet Functions 1 December 7th 04 02:37 PM
The value of a ListBox Item TK Excel Programming 2 August 20th 04 06:17 AM
Is refreshing listbox rowsource in listbox click event possible? Jeremy Gollehon[_2_] Excel Programming 4 September 25th 03 06:45 PM


All times are GMT +1. The time now is 12:57 PM.

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

About Us

"It's about Microsoft Excel"