Thread: Listbox help.
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Listbox help.

The simple method of making a list box for a userform is to first create the
userform:

1. Open the VBE by pressing Alt + F11.
2. On the menu bar of the VBE, click InsertUserForm

Then add the listbox to the form:

1. If the ControlToolbox toolbar is not visible, click ViewToolBox
2. Click on the ListBox icon
3. Move the cursor pointer (should be a crosshair) to a place on the
UserForm that you want the ListBos to appear and left click the mouse. The
ListBox should appear and the properties dialog box should appear at the
lower left of the screen.

If the properties box does not appear when the ListBox is added to the form,
then on the menu bar select ViewProperties Window. When the properties
window is visible you can add the range for your list:

1. Locate Row Source in the properties window.
2. Enter the range for the list in A1 format without quotation marks, i.e.
a2:a50 or a2:z2 or if multi-column a2:d50

To open the UserForm with code, you will need to use syntax like the
following

UserForm1.Show

To close the UserForm you would use syntax like this:

Unload UserForm1

"Morlin" wrote in message
...
Alot of folks have been nice to help me with things on here. I
appreciate it. I have a new project.

Listbox. I have a list that I want to be accessed from a userform

the list consists of just a single line of information.

1 Age
2 Education
3 Dishonorable discharge
4 Felony Conviction
5 Felony Commission
all the way to #36.

I'm creating a data entry form that will have name, ssn, dob, DQ
reason (my listbox), date of app

then obviously an enter button to enter the info onto the
spreadsheet. Could somebody tell me how to make the listbox?

Thanks ahead of time.