Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Worksheet Listbox selected item?

Hello,

I've created a listbox (lstImportFiles) on my worksheet (admin).

I have the range and the cell link (b2).

The value of B2 is 3. Now how do I get the value of the selected list item
for the worksheet listbox? I didn't quite get that by searching this forum.
Maybe I missed it, but I didn't see threads on retrieving the selected item
in a Worksheet listbox.

Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Worksheet Listbox selected item?

Sub fk()
MsgBox Sheet1.ListBox1.Value
End Sub


"Webtechie" wrote:

Hello,

I've created a listbox (lstImportFiles) on my worksheet (admin).

I have the range and the cell link (b2).

The value of B2 is 3. Now how do I get the value of the selected list item
for the worksheet listbox? I didn't quite get that by searching this forum.
Maybe I missed it, but I didn't see threads on retrieving the selected item
in a Worksheet listbox.

Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Worksheet Listbox selected item?

P.S. I assumed a single column, single select list box. If multicolumn,
single select, the code would return the value of the bound column. If
multiselect the code fails.

"Webtechie" wrote:

Hello,

I've created a listbox (lstImportFiles) on my worksheet (admin).

I have the range and the cell link (b2).

The value of B2 is 3. Now how do I get the value of the selected list item
for the worksheet listbox? I didn't quite get that by searching this forum.
Maybe I missed it, but I didn't see threads on retrieving the selected item
in a Worksheet listbox.

Thanks.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Worksheet Listbox selected item?

Hey,

That didn't work:

I tried:


Sheets("DataValues").Select
Range("j3").Value = Sheets("adminview").Shapes("lstImportFiles").Value

I got:


Run time error '438'
Object doesn't support this property or method.




"JLGWhiz" wrote:

P.S. I assumed a single column, single select list box. If multicolumn,
single select, the code would return the value of the bound column. If
multiselect the code fails.

"Webtechie" wrote:

Hello,

I've created a listbox (lstImportFiles) on my worksheet (admin).

I have the range and the cell link (b2).

The value of B2 is 3. Now how do I get the value of the selected list item
for the worksheet listbox? I didn't quite get that by searching this forum.
Maybe I missed it, but I didn't see threads on retrieving the selected item
in a Worksheet listbox.

Thanks.


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
Delete selected Item from listbox Office_Novice Excel Programming 2 May 1st 08 03:12 PM
How to get the index in VBA of the selected item in a ListBox Stefan Mueller[_2_] Excel Programming 4 July 16th 07 07:19 PM
Need selected item from listbox after double click [email protected] Excel Programming 1 February 23rd 06 03:18 PM
Listbox - write newly selected item back to the worksheet Cheryl Excel Programming 0 July 23rd 04 01:56 PM
Count number of selected item in Listbox Todd Huttenstine Excel Programming 4 June 14th 04 06:54 PM


All times are GMT +1. The time now is 12:47 AM.

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"