From: Brad on 25 May 2010 17:34 Thanks for taking the time to read my question. I have a user form on which I have a ComboBox. I'd like to have the ComboBox list the names of all the worksheets in the workbook. I've tried to make the rowsource a list like "Test1";"Test2" or "Test1","Test2" but no luck. If I could make the rowsource a string, I could build the string in VBA no problem and assign the string to the combobox. Is there a way to do this? Thanks, Brad
From: Mike on 25 May 2010 17:51 Private Sub UserForm_Initialize() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets With ComboBox1 .AddItem ws.Name End With Next End Sub "Brad" wrote: > Thanks for taking the time to read my question. > > I have a user form on which I have a ComboBox. I'd like to have the ComboBox > list the names of all the worksheets in the workbook. I've tried to make the > rowsource a list like "Test1";"Test2" or "Test1","Test2" but no luck. > > If I could make the rowsource a string, I could build the string in VBA no > problem and assign the string to the combobox. > > Is there a way to do this? > > Thanks, > > Brad
|
Pages: 1 Prev: GetOpenFilename code execution interrupted more mystery Next: Programmable Column Sequencing? |