View Single Post
  #7   Report Post  
Marcia3641
 
Posts: n/a
Default

Here is the code I have for my listbox.

Private Sub ListBoxLoanType_Click()
With ListBoxLoanType
..AddItem 'Fixed'
..AddItem 'Interest Only'
..AddItem 'ARM'
End With
End Sub


When I changed it to "initialize" I kept getting a message that it was
ambiguious and then the drop down object box at the top of the code screen
kept changing back to "general" instead of "ListBoxLoanType". Then when I go
to test the form, I am unable to click on the list boxes that I have on the
form. I can tab through all the boxes that are text but I am having no luck
with the three boxes that are list-boxes. Does anything look wrong to you? I
am at my wits end, because this is the only item I am having trouble with on
my form.
--
Marcia3641


"dominicb" wrote:


Hi Marcia

It does make a difference in that the "Initialize" bit will do
something to the userform when it first opens up, so the Listbox will
be populated immediately, whereas yours will not populate until you
click on the button you have named ListBoxAgegrp. Also, the command
AddItem should only be preceded by a single ".", not two as shown
below.

To run your userform set up a small macro such as:

Sub Test()
Userform1.Show
End Sub

and then call the macro, which will run your userform.

Finally, do stick with it! It does seem really baffling at first but
it does get easier. If you really need a hand try considering buying a
book (http://j-walk.com/ss/books/index.htm) to explain the whole concept
in detail. The satisfaction of finishing a project is worth it...!

Good luck

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=388914