RefEdit problems

T

T.c.Goosen1977

Im struggling with the following:

Userform1 in sheet1 loads userform2 in sheet2...userform2 contain
scroll, zoom & RefEdit options on it..._terminating() userform2 load
userform1 in sheet1 again..."cycle thing"...the cycle works perfectl
every time when i use both the scroll and zoom options on userform2 bu
when i use the RefEdit option on userform2 and when i then terminatin
userform2 it loads again userform1 and goes into a stalling / hangin
mode....??

I would like to link in a later stage the RefEdit information to
printing option...

I would appreciate some advice...thanks

Thanks
Theun
 
K

keepITcool

the refedit is a very problematic control.

there's hardly any documentation.
it will not work in modeless forms

it will present problems with focus (and out of sequence event
triggering) if contained in anything but the userform itself.

If possible: use a dialog. application.inputbox(type:=8)
If not: put it directly on the form, not inside a container
(frame/multipage etc)
Debugging:

Trace the refedit's exit event.
It MUST occur before you hide or close your userform.



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


T.c.Goosen1977 wrote in
 
T

T.c.Goosen1977

Hi, keepITcool you are the 1st to respond in 2 days... i got no response
from the group regarding my problem...your 1st part is greek to me but
debugging makes sense in tracing the Refedit exit before terminating
the userform...but i still don't know how to do it because the moment
of stalling there is no debugging response?... is it possible to send u
a small .xls file regarding a RefEdit problem...i would really
appriciate some advice.

Thanks
Theuns
 
K

keepITcool

Is your refedit directly on the form?
(or is it in a container like a multipage or frame)

I've recently had to make this work for a refedit
contained in a frame on a multipage...

i did following (and it's plenty of code, testing and debugging....)

on RefEdit ENTER

disable queryclose
disable all controls on the userform except activepage
disable all controls on the active page except the frame
disable all controls in the frame except the refedit
ENABLE ONE button in the frame.
(user MUST click on this button to get out of the refedit..
which triggers the EXIT event that reverses the above...


I had to do this, and it was no joke.

The RefEdit is a control I'd avoid like the plague.
(however sometimes you can't)


See the question at the top of this post.
IF it's directly on the userform then YES i will help you find out
where it goes wrong and probably what to do about it..
IF its' directly on the userform then mail me an example. My email is
in my signature just add the @ and . in the appropriate places.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


T.c.Goosen1977 wrote in
 
T

T.c.Goosen1977

keepITcool, it sounds like you know what you're talking about when it
comes to RefEdit problems....i would like to mail the small .xls file
(the Refedit control is in the userform) to you but i struggle to
understand your email adress. is it keepITcool at google.com?
 
K

keepITcool

I've sent you a private email.

the main problem was that the forms were instantiating each other..
causing a loop

e.g. Form1 instantiates a new Form4
Form4 instantiates a new Form1 on close
etc

i've repaired your code so you have only 1 instance of each form.
form1 is "controller" and form4 is shown/hidden when needed.

i've also added following to prevent focus remaining in the refedit.
when you press the Xbutton

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If Me.ActiveControl Is Me.RefEdit1 Then
Me.Frame1.SetFocus
DoEvents
End If
Cancel = True
Me.Hide
End Sub




--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


T.c.Goosen1977 wrote in
 

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