Zorder for Listbox appears erratic

K

Ken Soenen

Can anybody explain what's going on here ?

Put two listboxes and two commandbuttons on a form and
partially overlap the two listboxes. The code below should
alternately bring to the front and then to the rear Listbox2.

Private Sub CommandButton1_Click()
ListBox2.ZOrder (0)
End Sub

Private Sub CommandButton2_Click()
ListBox2.ZOrder (1)
End Sub

Here is what I'm seeing:

1. Run the form and it works fine. (or it may not work)
2. close the form
3. add a blank(if necessary) to the code and do a SAVE
4. run the form again and now it DOES NOT Work.
5. you can keep doing this and it alternates from WORKING to
NOT WORKING every time you do a SAVE.

I'm using Excel 2003. WORD does the same thing.
 
K

Ken Soenen

Repainting doesn't work. I tried it. The SAVE somehow affects the outcome.

ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top