Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Macro to create validation list of worksheet names

I have a large workbook consisting of a menu worksheet and many worksheet
templates. On the menu worksheet, I want to enable the user to select the
particular worksheets they need for their job from dropdown lists contained
in cells B1:B25. The names of the worksheet templates are subject to
change. In other words, the user may add a new duplicate template worksheet
to the workbook or they may change the names of any of the existing
templates. On the menu, I want a macro that will create a dropdown list in
each of cells B1 through B25 that includes all the current worksheet names in
the workbook except for a selected few that Ill call menu, Worksheet X,
Worksheet Y, and Worksheet Z. If possible, I would like to have the user
be able to hyperlink from their dropdown list to the selected worksheets.

I dont have much experience with vba therefore any help to a novice would
be greatly appreciated.

Many thanks in advance Tom.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default Macro to create validation list of worksheet names

Hi Tom

Look at this:

Sub Menu()
Dim Menu As Worksheet

Set Menu = Worksheets("Menu")

For Each sh In ThisWorkbook.Sheets
If sh.Name < "Menu" And sh.Name < "SheetX" Then
Menu.Hyperlinks.Add anchor:=Menu.Range("B1").Offset(off),
Address:="", _
SubAddress:="'" & sh.Name & "'!A1", TextToDisplay:=sh.Name
End If
off = off + 1
Next
End Sub

Regards,
Per

"tomhelle" skrev i meddelelsen
...
I have a large workbook consisting of a menu worksheet and many
worksheet
templates. On the menu worksheet, I want to enable the user to select
the
particular worksheets they need for their job from dropdown lists
contained
in cells B1:B25. The names of the worksheet templates are subject to
change. In other words, the user may add a new duplicate template
worksheet
to the workbook or they may change the names of any of the existing
templates. On the menu, I want a macro that will create a dropdown list
in
each of cells B1 through B25 that includes all the current worksheet names
in
the workbook except for a selected few that Ill call menu, Worksheet
X,
Worksheet Y, and Worksheet Z. If possible, I would like to have the
user
be able to hyperlink from their dropdown list to the selected worksheets.

I dont have much experience with vba therefore any help to a novice would
be greatly appreciated.

Many thanks in advance Tom.

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
XL07 create data validation list containing the names of each shee ker_01 Excel Worksheet Functions 0 May 14th 09 10:11 PM
Create auto updating data validation list from all worksheet names fryguy Excel Worksheet Functions 7 December 11th 07 08:59 PM
How do I create a list (Word) of the names on Excel worksheet tabs PT[_2_] Excel Worksheet Functions 3 February 23rd 07 05:24 PM
Create a list in one worksheet of the other worksheets' names Kelli Excel Worksheet Functions 0 July 7th 05 08:45 PM
How do I create a validation list on a separate worksheet? Ronaldo Excel Worksheet Functions 2 November 26th 04 10:23 PM


All times are GMT +1. The time now is 09: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"