new error when try to load userform

I

izchk shtifman

dear
expert

i have a project and use "userform1" and so far it's work ok
to day i add some controllers to userform and sub module
and i got an error message
"
run-time error
'2110'
can't move focus to the control because it is invisible,not enabled,o
a type that does not
accept the focus
"
and when i press on button debug the yellow line point on th
command
load userform1
i used this command before and i did not change any thing
except what i explain erlear and the new sub module it's called afte
the userform loaded
i try to "play" with enable and visible but nothing help
i also take another project with the same reference and there(in othe
project) it's work
when i push the button help at error message a blank page appear
and this error message number not found in visual help
could you help me
regard
izchack shtifma
 
H

Harald Staff

Hi Izchack

My guess -seeing your code would be useful : Load is not the same as Show. You can Load a
form and it's still only in RAM, not on screen. And if the form's Initialize code has some
SetFocus job, it will err since there's no focus on an invisible form. So -still guessing-
replace
Userform1.Load
with
Userform1.Show

When tons of code call and rely on eachother then the debugger isn't always of great help.
The problem is deeper down the chain than what Debug displays, as it probably is here.
 

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