PDA

View Full Version : [SOLVED] UF Reflect Sheets & Future Sheets



Emoncada
03-19-2015, 06:10 AM
I have created a userform that I would like to be able to have it reflect Activesheet.name in a Combobox.
The hard part is I have a commandButton that creates a new sheet, What I would like is to have that name added to that Combobox.
So that the user can change sheets by selecting from the ComboBox.

So as they use the userform and add more sheets, they can change from one sheet to another from that combobox.

Any help would be great.

Thanks,

jonh
03-19-2015, 07:19 AM
Private Sub ComboBox1_Enter()
ComboBox1.Clear
For Each sht In ThisWorkbook.Sheets
ComboBox1.AddItem sht.Name
Next
ComboBox1 = ThisWorkbook.ActiveSheet.Name
End Sub

Private Sub ComboBox1_Click()
ThisWorkbook.Sheets(ComboBox1.Text).Select
End Sub

Emoncada
03-19-2015, 08:31 AM
Awesome jonh That worked perfectly.
Thanks Again.