Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is the first part of my code:
Sub CreateMethodE() Dim idex As Long Dim newname As Worksheet Set newname = Sheets("Program") On Error Resume Next Worksheets(2).DropDowns("MethodE").Delete On Error GoTo 0 On Error Resume Next Worksheets(2).DropDowns("typeE").Delete On Error GoTo 0 With Worksheets(2).Shapes.AddFormControl(xlDropDown, _ Left:=245, Top:=189.75, Width:=192, Height:=15) .ControlFormat.DropDownLines = 3 .ControlFormat.AddItem "E1: Mainline or Public Road Approach", 1 .ControlFormat.AddItem "E2: Drive, Including Class V", 2 .ControlFormat.AddItem "E3: Median/Mainline or Public Road Approach*", 3 .Name = "MethodE" .OnAction = "MethodE_Change" End With End Sub _________ When the user selects one of the options in 'CreateMethodE' another combobox appears called 'MethodE_Change' This is a portion of the code for MethodE_Change: Sub MethodE_Change() Dim idex As Long Dim newname As Worksheet Set newname = Sheets("Program") On Error Resume Next Worksheets(2).DropDowns("typeE").Delete On Error GoTo 0 idex = Worksheets(2).DropDowns("MethodE").ListIndex With Worksheets(2).Shapes.AddFormControl(xlDropDown, _ Left:=245, Top:=309, Width:=192, Height:=15) .ControlFormat.DropDownLines = 7 .Name = "typeE" Select Case idex Case 1 .ControlFormat.AddItem "E1: Circular Corrugated Pipe", 1 .ControlFormat.AddItem "E1: Circular Corrugated Pipe (SPM)", 2 .ControlFormat.AddItem "E1: Circular Smooth-Interior Pipe", 3 .ControlFormat.AddItem "E1: Deformed Corrugated Pipe", 4 .ControlFormat.AddItem "E1: Deformed Corrugated Pipe (SPAA)", 5 .ControlFormat.AddItem "E1: Deformed Corrugated PIpe (SPS)", 6 .ControlFormat.AddItem "E1: Deformed Smooth-Interior Pipe", 7 .OnAction = "E1Pipe_Change" ...... End Sub __________________ After the user makes a selection from MethodE_Change, I need text to appear in cells. If the user selects "E1: Circular Corrugated Pipe", I need text in each cell from(K26:K30). If the user selects "E1: Circular Corrugated Pipe (SPM)", I need text to appear in each cell from (K26:K28). I also need the text to be cleared after each selection. Can someone help me? -- Message posted via http://www.officekb.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|