Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I was hoping someone could help me figure out what I am doing wrong.
I have a list box set up on a worksheet and I want the user to select a value from the list box, and then have that value entered into a cell when a button is clicked. When I run/step through the macro, it takes a value and places it into the appropriate cell. The problem is that the value which is placed in the cell is not the value from the listbox, but the row number of the value that was chosen. Using the below row numbers and values as an example; if I select value 7 from the list box, the value that is returned is 2, not 7. If I select 9A, the value returned is 4. The listbox value range is on different worksheet than the worksheet where I want to place the listbox value. The listbox range is currently one column with about 200 rows. Worksheet Row Number Value 1 6 2 7 3 8 4 9A 5 10B The condensed version of the code (excluding how I choose the cell) is: Dim listvalue As String Dim rowcounter As Integer Dim EOBpointer As Range Worksheets("Timer").Activate ActiveSheet.Shapes("List Box 8").Select rowcounter = 35 listvalue = Selection.Value Set EOBpointer = Range("c" & rowcounter) EOBpointer.Select Selection.Value = listvalue |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
looking up a value only if it returns a value in another list | New Users to Excel | |||
Use VBA to reset data validation (=list) value to first value in that list (list is a named range) | Excel Programming | |||
Is there a formula that returns the number at the bottom of a list | Excel Discussion (Misc queries) | |||
User List Box - List from Hidden range - VBA worng | Excel Programming | |||
Condensing a list/range with blank cells to a new list/range without blanks | Excel Worksheet Functions |