Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Copy text from a List box to a Cell!

I also forgot to mention that you will need to change the
name of the ListBox "List Box 2" to the name of your
ListBox.

Regards,
James S
-----Original Message-----
Hi Kevin,

You can try the code below. You will need to do the
following:

1) Add the code below to workbook.
2) Right-click your list box and select "Assign Macro",
then select the Macro named "ReturnListBoxSelection".
3) I used the worksheet name "Notes", so if your
worksheet name is different you will need to change

it.

Sub ReturnListBoxSelection()
Dim lbcf As ControlFormat

Set lbcf = ThisWorkbook.Worksheets("Notes").Shapes
("List Box 2").ControlFormat

ActiveCell.Value = lbcf.List(lbcf.ListIndex)
End Sub

Hope this helps.

Regards,
James S

-----Original Message-----
I made a List Box from the Form Menu and input a range

of cells
(Notes!$A$2:$A$21) that contain a list of names. What I

would like to do is,
to select a cell and the goto the List Box select a

Name
and then it would
just copy that name to the previously selected cell. Is

this possible? or
way to complicated to mess with.
At the moment all I do is select the name from the List

Box and the type the
name into the cell! Its just a list that helps me

remember all the names.

Thank you in advance for all your help!

Kevin Brenner

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
Find text in a cell and copy text to another cell Shaun Excel Discussion (Misc queries) 6 July 4th 07 05:25 PM
Copy text from text box to cell in another worksheet pfa Excel Worksheet Functions 2 June 24th 06 01:29 AM
Copy List of text to a single cell? nastech Excel Discussion (Misc queries) 3 February 15th 06 02:19 AM
Copy List of text to a single cell? CLR Excel Discussion (Misc queries) 0 February 13th 06 08:39 PM
Copy text from a List box to a Cell! Tumbleweed Excel Programming 1 September 19th 03 06:03 AM


All times are GMT +1. The time now is 10:08 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"