Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I create a worksheet using a drop down list?
Hi guys,
Is there any way to create a worksheet using a drop down list? For example, if I had a drop down list consisting of M and B, selecting one of the two values would create a worksheet with the name M with preassigned formulae and values in the sheet? Thanks |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I create a worksheet using a drop down list?
The easiest way would be to prepare the 2 worksheets and hide them. Then
attach a simple unhide macro to your drop down list. If you really want to create all sheet contents on-the-fly you would have to take additional precautions so that another selection from your drop down list doesn't overwrite an already existing sheet M with a fresh version. Joerg "TodiHawk" wrote in message ... Hi guys, Is there any way to create a worksheet using a drop down list? For example, if I had a drop down list consisting of M and B, selecting one of the two values would create a worksheet with the name M with preassigned formulae and values in the sheet? Thanks |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I create a worksheet using a drop down list?
Try this, assuming the DV is in cell H1
Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "H1" '<== change to suit On Error GoTo ws_exit Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target Worksheets.Add.Name = .Value End With End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "TodiHawk" wrote in message ... Hi guys, Is there any way to create a worksheet using a drop down list? For example, if I had a drop down list consisting of M and B, selecting one of the two values would create a worksheet with the name M with preassigned formulae and values in the sheet? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
create a drop down list | Excel Worksheet Functions | |||
Can I create a drop-down list that will reference other drop-down | Excel Worksheet Functions | |||
How To Create A Drop Down List? | New Users to Excel | |||
How do I create a simple drop down box/List | Excel Discussion (Misc queries) | |||
How do you create a drop down list? | Excel Discussion (Misc queries) |