View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Tushar Mehta[_3_] Tushar Mehta[_3_] is offline
external usenet poster
 
Posts: 37
Default Strange RefEdit Problem

Don't know what the 1st one is; the last 2 are web browser and treeview
respectively. I often add controls on a temporary / experimental basis
and then remove them when I no longer need them.

In article ,
says...
Thanks for the reference. I appreciate all the ideas I can get.

By the way, what are the four additional controls you show in your UserForm
toolbox? I recognize the Date and Time Picker, but the three in the bottom
right are unfamiliar to me. Could you tell me what they are and what they
do?

Thanks,
Pflugs

"Tushar Mehta" wrote:

The RefEdit is a very important control but has all sorts of
limitations.

Also, I avoid using events with various text/combobox/refedit-type
controls preferring to wait until the user clicks the userform's OK
button before validating various user choices. You might want to check
Userform design
http://www.tushar-mehta.com/publish_...rinterface.htm

For my take on the RefEdit control see the sections starting with 'Range
references in a userform'

In article ,
says...
I had not seen Jon's post since 6/30 was my wedding day. I apologize.

The two RefEdit controls were in frames. I have since removed the frames,
but I still had problems with the RefEdit events. I removed all set focus
commands relating to the RefEdits, and I'm trying to write other events
instead of a RefEdit_Change event.

Are there any problems with using Enter/Exit/Change events with other
controls, especially textboxes?

Thanks,
Pflugs

"Jim Cone" wrote:


Jon Peltier's advice/answer to your almost identical post of 06/27/2007
would be worth reading again.
I would add - never set the focus to a RefEdit control and
do not add a RefEdit control to a Frame.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Pflugs"
wrote in message
I have been having issues using RefEdit controls and events, and I have
narrowed the problem down to how the user uses the control. That is, if
RefEdit1 has focus and the user clicks in the text box area of the control
and then selects cells in the background, everything is fine. All events
work correctly, and the userform works as planned.

However, if the user clicks on the RefEdit's button (the one with a
horizontal line that when clicked collapses the form), the user is allowed to
select cells and return to the form, but when the events attempt to run, the
userform crashes. Excel crashes soon thereafter.

I am using enter, exit, and change events with the RefEdit control. I have
tried cleaning the code with Rob Bovey's cleaner. Removing all RefEdit
events seemed to work, but the userform doesn't function as I want it to.

Does anyone have an explanation for this? Is there a way to limit the
RefEdit control to not allow users to click on the collapse button?

Thanks,
Pflugs