Private Sub Worksheet_Activate()
Dim i As Integer
ComboBox1.Clear
For i = 1 To ActiveSheet.Scenarios.Count
ComboBox1.AddItem ActiveSheet.Scenarios(i).Name
Next
ComboBox1.Text = "Select Scenario"
End Sub
Private Sub ComboBox1_Click()
On Error Resume Next
ActiveSheet.Scenarios(ComboBox1.Text).Show
End Sub
where do i put the pieces of code and how do i link a combobox to it... sorry for my stupidity
Dim i As Integer
ComboBox1.Clear
For i = 1 To ActiveSheet.Scenarios.Count
ComboBox1.AddItem ActiveSheet.Scenarios(i).Name
Next
ComboBox1.Text = "Select Scenario"
End Sub
Private Sub ComboBox1_Click()
On Error Resume Next
ActiveSheet.Scenarios(ComboBox1.Text).Show
End Sub
where do i put the pieces of code and how do i link a combobox to it... sorry for my stupidity