ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Listbox selected (https://www.excelbanter.com/excel-programming/429222-listbox-selected.html)

[email protected]

Listbox selected
 
Hi All,

I have created a listbox in userform.
Listbox display details of Activeworksheet.

If two or three items in a listbox are selected.
In a single short can I update new value for those
which I have selected ? the result will be
updated in activeworksheet.

Please help me

Thanks in advance.

Patrick Molloy

Listbox selected
 
you can iterate through for selected items

with listbox1
for i = 0 to .listcount-1
if .selected(i) then
'' do something
end if
next
end with

it really depends on how you want the data changed.

wrote in message
...
Hi All,

I have created a listbox in userform.
Listbox display details of Activeworksheet.

If two or three items in a listbox are selected.
In a single short can I update new value for those
which I have selected ? the result will be
updated in activeworksheet.

Please help me

Thanks in advance.



royUK[_135_]

Listbox selected
 

You can, it depends on your data layout , number of columns in the
Listbox etc.

You should be able to get the Row Number of the selection from the
listIndex.

It would help to see an example workbook

HOW TO GET FURTHER HELP WITH A WORKBOOK
For further help with it why not join our forums (shown in
the link below) it's completely free, if you do join you will have the
opportunity to add attachmnets to your posts so you can add workbooks to
better illustrate your problems and get help directly with them. Also if
you do join please post in this thread (link found below) so that people
who have been following or helping with this query can continue to do
so. :)


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site' (http://www.excel-it.com/)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=102240



All times are GMT +1. The time now is 05:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com