ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   LIST BOX HELP (https://www.excelbanter.com/excel-programming/373914-list-box-help.html)

MikeM

LIST BOX HELP
 
I'm just starting to use List Boxes, and Multi Select List Boxes.
I would like to do the following:

I have a List Box with a Row Source that refers to Sheet inside the
Wookbook. I would like to Click onto any one of the "Items" in the list Box
and when I do, it takes me to that Sheet.

The second example is to create a Print Selection, Here I would like to
have the ability to have "Check Boxes" so that I can choose any number of
boxes that I wish to Print. Each box is associated to a Print Range.

--
MJM

Tom Ogilvy

LIST BOX HELP
 

set the listStyle property of the listbox to fmListStyleOption
and set the multiselect property to fmMultiSelectMulti

then

worksheets(Userform1.Listbox1.Value).Select

Dim rng as Range
with Useform1.listbox2
for i = 0 to .listcount - 1
if .selected(i) then
set rng = Range(.List(i))
rng.Printout
end if
Next
End with

--
Regards,
Tom Ogilvy

"MikeM" wrote:

I'm just starting to use List Boxes, and Multi Select List Boxes.
I would like to do the following:

I have a List Box with a Row Source that refers to Sheet inside the
Wookbook. I would like to Click onto any one of the "Items" in the list Box
and when I do, it takes me to that Sheet.

The second example is to create a Print Selection, Here I would like to
have the ability to have "Check Boxes" so that I can choose any number of
boxes that I wish to Print. Each box is associated to a Print Range.

--
MJM



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

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