RefEdit causing crashes

P

presspley

I am having intermittent problems with Refedit.

I have a dialog box which has a refedit contained in a Tabstrip. I
have some code that checks the refedit box values every time the
tabstrip changes, ie the user has moved to the next part of the
process.

Normally what happens is the the dialog disappears and when I go into
VBA it sometimes says its still running but it never kills the process
properly.

If you run the process again it kills the old version properly but the
kills Excel.

Any ideas?
 
D

Dave Peterson

Use application.inputbox.

dim myRng as range
set myrng = nothing
on error resume next
set myrng = application.inputbox(prompt:="hi there!",type:=8)
on error goto 0

if myrng is nothing then
'user hit cancel
else
'you have a range
end if
 
P

Presspley

Thanks you a life saver

Dave Peterson said:
Use application.inputbox.

dim myRng as range
set myrng = nothing
on error resume next
set myrng = application.inputbox(prompt:="hi there!",type:=8)
on error goto 0

if myrng is nothing then
'user hit cancel
else
'you have a range
end if
 

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