#1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default listbox

I have a listbox on a userform to select a item in a column, that works
fine! Upon selection i want to pick up values from other cells in the
row of my selection for editting in textboxes on another userform. Can
anyone point me in the right direction on how i can achieve this?

  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default listbox

Oggy

If you have the selection set up then depending on how you have this use the
offset property to get data from other cells in the row or other columns,
like so

Range("A1").Offset(0,1).Value

will get the value in B1

You can use negatives to refer to cells left or up. The selection using this
property is NOT changed

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Oggy" wrote in message
ups.com...
I have a listbox on a userform to select a item in a column, that works
fine! Upon selection i want to pick up values from other cells in the
row of my selection for editting in textboxes on another userform. Can
anyone point me in the right direction on how i can achieve this?


  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default listbox

Thanks Nick,

how do i make the cell i selected in the list the active cell to work
from so the i can make my code as follows

Range(selection).Offset(0,1).Value

Thanks very much for your advise, much appriecated

regards

Oggy



Nick Hodge wrote:
Oggy

If you have the selection set up then depending on how you have this use the
offset property to get data from other cells in the row or other columns,
like so

Range("A1").Offset(0,1).Value

will get the value in B1

You can use negatives to refer to cells left or up. The selection using this
property is NOT changed

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Oggy" wrote in message
ups.com...
I have a listbox on a userform to select a item in a column, that works
fine! Upon selection i want to pick up values from other cells in the
row of my selection for editting in textboxes on another userform. Can
anyone point me in the right direction on how i can achieve this?


  #4   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default listbox

Oggy

If the cell is a single cell then

Selection.Offset(0,1).Value

If it is likely to be more than 1 then (or anyhow)

ActiveCell.Offset(0,1).Value

As you can only have 1 active cell

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Oggy" wrote in message
ps.com...
Thanks Nick,

how do i make the cell i selected in the list the active cell to work
from so the i can make my code as follows

Range(selection).Offset(0,1).Value

Thanks very much for your advise, much appriecated

regards

Oggy



Nick Hodge wrote:
Oggy

If you have the selection set up then depending on how you have this use
the
offset property to get data from other cells in the row or other columns,
like so

Range("A1").Offset(0,1).Value

will get the value in B1

You can use negatives to refer to cells left or up. The selection using
this
property is NOT changed

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Oggy" wrote in message
ups.com...
I have a listbox on a userform to select a item in a column, that works
fine! Upon selection i want to pick up values from other cells in the
row of my selection for editting in textboxes on another userform. Can
anyone point me in the right direction on how i can achieve this?



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
userform listbox cannot get listbox.value to transfer back to main sub [email protected] Excel Programming 1 May 17th 06 09:44 PM
avoiding duplicates in listbox (added from another listbox) KR Excel Programming 4 March 14th 06 08:17 PM
VBA: Creating listbox similar to the one in Pivot table (Listbox+Checkbox) modjoe23 Excel Programming 3 August 18th 05 02:35 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM
Is refreshing listbox rowsource in listbox click event possible? Jeremy Gollehon[_2_] Excel Programming 4 September 25th 03 06:45 PM


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