RefEdit

T

TJ

Can someone suggest a way around this? I use a RefEdit control to
allow a user to select several columns to be processed. However
RefEdit1_Change is processed multiple times. i.e. when the user
activates the RefEdit control on the form, and selects a range, the
RefEdit1_Change sub is processed more than once. Is there a way of
processing the range that was selected when the user exits the RefEdit
control and reverts to the form?

tia

bob


Sub RefEdit1_Change()

....some code

End Sub
 
B

Bob Phillips

Use the Exit event.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
T

TJ

Thanks, I tried it.

When I use the Exit event, no controls on the form are updated until I
click on one of the controls. i.e. at the in the Exit event, I load
the selected columns to a listbox and set the RefEdit1.Text to "".
When teh Exit event finishs, neither of these things are visible or
seem to have happened. When I click any other control on the form,
the ListBox displays the columns as it should and the RefEdit control
now displays "". Any idea what causes this, or, how I could simulate
a mouse click on one of the controls?

Thanks
bob
 
T

TJ

That was not too clear... sorry

Here is an example of what I was trying to say...


Sub RefEdit1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
MsgBox "fff"
RefEdit1.Text = ""
End Sub

The MsgBox does not come up, and RefEdit.Text is not set to "" until I
click some other control on the form.

bob
 

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

Similar Threads


Top