ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   listbox multiselect to control original cells (https://www.excelbanter.com/excel-programming/399032-listbox-multiselect-control-original-cells.html)

ArmsteR

listbox multiselect to control original cells
 
Is it possible to get the multiselection the users make in the listbox
correlate directly to the original cells the rows pertain to?

the reason is I need to be able to get the users to multi select the
cells they want to print and then send print commands to the documents
ancd drawings located in their hyperlinks. So if there was some way to
pull the Cells selections then I could work with this indefinately.
I''m unsure whether this is feasable, I was thinking of putting the
multiselect results into an array using the text values then doing a
vlookup or something, but the original drawing register sheet doesn't
have unique items just unique hyperlinks :P I cannot manipulate the
physical layout of the sheet itself as other macro's are located on
these sheets.

many thanks
Dave


Dave Peterson

listbox multiselect to control original cells
 
If the range is contiguous, maybe you could just loop through the listbox's
list--and then offset from the first cell of the range.


dim FirstCell as range
'set firstcell = to the firstcell in the range
With Me.ListBox1
For lCtr = 0 To .ListCount - 1
If .Selected(lCtr) Then
msgbox firstcell.offset(lctr,0).value
End If
Next lCtr
End With



ArmsteR wrote:

Is it possible to get the multiselection the users make in the listbox
correlate directly to the original cells the rows pertain to?

the reason is I need to be able to get the users to multi select the
cells they want to print and then send print commands to the documents
ancd drawings located in their hyperlinks. So if there was some way to
pull the Cells selections then I could work with this indefinately.
I''m unsure whether this is feasable, I was thinking of putting the
multiselect results into an array using the text values then doing a
vlookup or something, but the original drawing register sheet doesn't
have unique items just unique hyperlinks :P I cannot manipulate the
physical layout of the sheet itself as other macro's are located on
these sheets.

many thanks
Dave


--

Dave Peterson


All times are GMT +1. The time now is 09:45 AM.

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