ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Fill 2 column list box with sheet names (https://www.excelbanter.com/excel-programming/434693-fill-2-column-list-box-sheet-names.html)

John[_140_]

Fill 2 column list box with sheet names
 
I'm trying to make a 2 column list box, filled with sheet names. I have 72
sheet tabs in my workbook, and would like to make a simple "go to" out of
the 2 column list box, where you click on the sheet name and it selects the
sheet. (I'd like half the sheet names on the left, the other half on the
right). I appreciate any help



OssieMac

Fill 2 column list box with sheet names
 
Hi John,

Could you provide some samples of the sheet names and examples of how you
want the names split into 2 columns. Not sure whether you want to split each
sheet name into 2 parts or you mean half of list of the names in the one
column and the remaining half of the list in the other column. (If the former
then I can't imagine why and if the latter then I don't think it is possible
to achieve your desired outcome.)

--
Regards,

OssieMac


"John" wrote:

I'm trying to make a 2 column list box, filled with sheet names. I have 72
sheet tabs in my workbook, and would like to make a simple "go to" out of
the 2 column list box, where you click on the sheet name and it selects the
sheet. (I'd like half the sheet names on the left, the other half on the
right). I appreciate any help




John[_140_]

Fill 2 column list box with sheet names
 
Sheet 1 is named Start, Sheet 2 is named Summary, then sheet names are B1,
B2, B3, etc to B36. Then Inv1, Inv2, Inv2, etc to Inv36. However, sheets B1,
B2, etc may be renamed by the user. In my list box I'm for:

Start Inv1
Summary Inv2
B1 Inv3
B2 Etc.
RenamedSheet
Etc.



"OssieMac" wrote in message
...
Hi John,

Could you provide some samples of the sheet names and examples of how you
want the names split into 2 columns. Not sure whether you want to split
each
sheet name into 2 parts or you mean half of list of the names in the one
column and the remaining half of the list in the other column. (If the
former
then I can't imagine why and if the latter then I don't think it is
possible
to achieve your desired outcome.)

--
Regards,

OssieMac


"John" wrote:

I'm trying to make a 2 column list box, filled with sheet names. I have
72
sheet tabs in my workbook, and would like to make a simple "go to" out of
the 2 column list box, where you click on the sheet name and it selects
the
sheet. (I'd like half the sheet names on the left, the other half on the
right). I appreciate any help






John

Fill 2 column list box with sheet names
 
John,
if you are just trying to make a POPUP to make sheet selection easier, have
play with this bit of code & see if helps you.

Sub SelectSheet()
If ActiveWorkbook.Sheets.Count <= 16 Then

Application.CommandBars("Workbook Tabs").ShowPopup 500, 225

Else

Application.CommandBars("Workbook Tabs").Controls("More
Sheets...").Execute

End If

End Sub
--
jb


"John" wrote:

I'm trying to make a 2 column list box, filled with sheet names. I have 72
sheet tabs in my workbook, and would like to make a simple "go to" out of
the 2 column list box, where you click on the sheet name and it selects the
sheet. (I'd like half the sheet names on the left, the other half on the
right). I appreciate any help




OssieMac

Fill 2 column list box with sheet names
 
Hello again John,

I don't understand why you want 2 columns. When you select a row from a list
box you can use code to decide whether you want the column 1 value or the
column 2 value but to the best of my knowledge you cannot select the column 1
or column 2 value.

--
Regards,

OssieMac




All times are GMT +1. The time now is 03:44 PM.

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