update combobox with sheet names

  • Thread starter Thread starter Johnnyb
  • Start date Start date
J

Johnnyb

I have created an excel spreadsheet which uses a macro connected to
button to create and rename new sheets, How can I get a combo box t
store and update these sheet names as they are created?

Thankyou,

Regards,

Johnny
 
Keeping track of sheets added is easy.
Tracking if sheets are renamed is not so easy..

Why dont you populate the combo when it is selected ?

Private Sub ComboBox1_GotFocus()
Dim i%
With Sheets
ReDim lst(1 To .Count)
For i = 1 To .Count
lst(i) = Sheets(i).Name
Next
End With
ComboBox1.List = lst
End Sub


keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 
Back
Top