Loading combo box list
Thanks for the tip. That is actually what I was trying to do, but I was
making it much more complicated than you have done.
"Ryan H" wrote:
If it's always the last 2 sheets you don't want then you could use this which
would be a tade shorter. Hope this helps! If so, let me know, click "YES"
below.
For wks = 1 To Sheets.Count - 2
Me.ComboBox1.AddItem Sheets(wks).Name
Next wks
--
Cheers,
Ryan
"Greg Snidow" wrote:
Ok, that was easy.
For Each sh In ActiveWorkbook.Sheets
If sh.Name < "BDMS" And sh.Name < "HELD" Then
Me.ComboBox1.AddItem sh.Name
End If
Next
"Greg Snidow" wrote:
Greetings. I am loading a combo box list on the initialize event with code I
found here, and it works perfectly.
For Each sh In ActiveWorkbook.Sheets
Me.ComboBox1.AddItem sh.Name
Next
However, there are two sheets, the last two that I don't want to show up in
the list. I can't find an easy way to keep these two sheets out. Any ideas?
Thank you.
Greg
|