LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default List box value returns the row number of the list box range row

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
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
looking up a value only if it returns a value in another list Richard New Users to Excel 11 March 15th 10 11:21 PM
Use VBA to reset data validation (=list) value to first value in that list (list is a named range) ker_01 Excel Programming 7 October 27th 08 03:13 PM
Is there a formula that returns the number at the bottom of a list mpenkala Excel Discussion (Misc queries) 4 February 4th 08 09:59 PM
User List Box - List from Hidden range - VBA worng Stan Excel Programming 4 October 19th 07 09:00 PM
Condensing a list/range with blank cells to a new list/range without blanks KR Excel Worksheet Functions 4 July 5th 05 04:23 PM


All times are GMT +1. The time now is 06:48 AM.

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"