View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
stanshoe stanshoe is offline
external usenet poster
 
Posts: 34
Default Variable ComboBox on Userform

Dave-

You can use named ranges to let Excel keep track of how many users are in
your list. Highlight the list of names on the ReferenceDoc.xls worksheet
and then select Insdert Name Define. Give the referenced cells a name
and use that name when you set the RowSource property for the combo box. e.g.
UserForm1.ComboBox1.RowSource ="[ReferenceDoc.xls]Misc!range name"

When you want to add a new user to the list, insert a row in the middle of
the list. Excel will automatically expand the named range. If you simply
add a name at the end of the list, it will fall outside the range and not
appear in the combo box.

Stan Shoemaker
Saratoga, CA

"DHallam" wrote:


Hi,

I am almost a complete beginner when it comes to programming so forgive
me if there is an easy programming solution to my problem.

I have managed to get a user form to be activated when the excel
program opens and I wish for the users to identify themselves when the
program opens so we know who is using the system. I have manage to
have a list for them to choose from by using a combo box on the user
form, however I need the list to be variable so that if people come and
go we can easily add/remove them from this list.

Currently the list of 4 people is listed in a separate file called
€śReferenceDoc.xls€ť which also opens when this file does. Some of the
validation lists I use in the program I have been able to use an offset
and count function to make them variable (shown below) but cant seem to
make this work on my userform and dont know if this function is just
not possible.

=OFFSET(Misc!$E$10,0,0,COUNTA(Misc!$E:$E))

Any help on this would be much appreciated

Thank
Dave


--
DHallam
------------------------------------------------------------------------
DHallam's Profile: http://www.excelforum.com/member.php...o&userid=25253
View this thread: http://www.excelforum.com/showthread...hreadid=387443