#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
protect cells after listbox selection Chay Excel Discussion (Misc queries) 0 November 30th 06 06:49 PM
protect cells after listbox selection JLatham Excel Discussion (Misc queries) 0 November 30th 06 03:00 PM
listbox B conditional of input in Listbox A Kim K Excel Discussion (Misc queries) 1 October 31st 06 08:27 PM
Listbox B if LIstbox A equals Kim K Excel Discussion (Misc queries) 2 October 31st 06 07:03 PM
Listbox & Selection sparx Excel Discussion (Misc queries) 0 July 31st 06 10:48 PM


All times are GMT +1. The time now is 07:51 PM.

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"