#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default RefEdit

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default RefEdit

Use the Exit event.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default RefEdit

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

On Sun, 12 Mar 2006 23:04:36 -0000, "Bob Phillips"
wrote:

Use the Exit event.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default RefEdit

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

On Sun, 12 Mar 2006 17:39:39 -0500, wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
RefEdit question tt Excel Discussion (Misc queries) 2 February 8th 06 03:42 AM
RefEdit in VB6 Ben Crinion Excel Programming 0 October 8th 04 11:00 AM
RefEdit control Tim[_39_] Excel Programming 2 August 10th 04 07:02 PM
Selecting Refedit value monika Excel Programming 5 April 6th 04 06:09 AM
RefEdit daMike[_2_] Excel Programming 3 December 13th 03 07:31 PM


All times are GMT +1. The time now is 01:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"