VBA Clear Screen

D

Doobage20

I am trying on a VBA form to clear the screen leaving blank variables. The
screen does clear fine. The problem I am running into is that one of the
fields being cleared is the product list selection. After the clear screen,
the product list add the list of products to the existing list so the
products are now displayed twice. Clear the screen again and the product
list is displayed three times. Any ideas on why this is happening.

Private Sub ClearButton1_Click()
Prqty.Text = ""
PrComboBox.Value = "Select a Product"
PrMSRP.Text = ""
Prwholesale.Text = ""
Pronline.Text = ""
End Sub

Doobage
 
R

Rick Rothstein

A ListBox is not cleared by clearing its Text property... it has a Clear
method which you should use to clear the items from the list...

YourListBoxName.Clear
 

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