Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Some people here in the forum where trying to help me with a problem I
have, but I was incapable of fallowing their instruction, can anyone help with step by step instructions, please, I'm sure I'm missing something very simple! I made a Combo Box from the Forms 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 any cell and then go to the Combo Box select a Name and then it would just copy that name to the previously selected cell. just a cut and paste of the text, but I what the option of been able to just add to the pasted text. I think part of the problem is that is no a Control type list box but a plain Forms(non-VBA) list and the help is for a Control box? James S. was nice enough to help me with this code so I can add to my excel sheet but I could not find the name of the Listbox Here is the original email that James S. posted: 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 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 Thank you in advance for all your help! Kevin Brenner |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy cell contents, then paste into the same cell with other text. | Excel Discussion (Misc queries) | |||
Extract Cell Comments and Paste as text in a cell | Excel Worksheet Functions | |||
how to cut part of a text from one cell and automatically paste itonto another cell | Excel Discussion (Misc queries) | |||
Cutting text from one cell to paste in another? | Excel Worksheet Functions | |||
How do I paste text data into ONE cell only? | Excel Discussion (Misc queries) |