Hi Katrina -
Question 1. Set two properties for the listbox using the Properties Window.
Set the RowSource property to a worksheet range that holds the 12 months of
the year (Jan, Feb, Mar, etc.). Then set the ControlSource property to your
target cell Sheet1:AA19 and that month should be highlighted whenever the
list opens.
Question 2. Comboboxes can be populated with "dynamic ranges". Dynamic
range names refer to ranges that change in size at will. They're dynamite
for a variety of applications, so I think its worth the time investment to
learn about how to tame them. There are a number of sources, including this
discussion group, but check out the following for starters:
http://www.ozgrid.com/Excel/advanced-dynamic-ranges.htm.
Good luck.
--
Jay
"Katrina" wrote:
So far a single selection listbox is the only userform I haven't been able to
figure this out on. I have 4 listboxes with the same problem...the simplest
is filled with months during the initialize event. I would like it to
display with the previous selection highlighted as default. For example, if
the previous entry was November, I would like November to be highlighted, but
it always goes back to January. The previous entry is always stored in
sheet1:AA19 as a string. One other question I have regards populating a list
or combobox from a variable sized range. For example, I use xlDown to
determine where the end of the list is and name it FarmTable. I then specify
Listbox1.ControlSource=Farmtable.address. The problem is if FarmTable is on
Sheet1 and Sheet2 is activated, the program populates the box from the
specified cells on the active sheet. I can work around this issue but would
like to avoid having the application user seeing all the tables and "guts"
throughout the workbook so am always trying accomplish things without
actually selecting ranges while having an empty range on the screen. Any
help would be appreciated. Thank you. Katrina