How Do I Get SetFocus To Work???

M

Minitman

Greetings,

I am trying to use SetFocus on my UserForm and I keep getting this
error:

Run-time error '-2147418113 (8000ffff)':
Unexpected call to method or property access.

The debugger then highlights this line:

BankFrame.Visible = True
CBox1 is the first item on a frame this line comes just after the
frame is made visible. If I 'rem' out the line the code the rest of
the code works with mouse clicks to get the focus. It's the same with
getting off the frame.

Does anyone have any idea as to what is going on???

Any help would be appreciated.

TIA

-Minitman
 
M

Minitman

Correction:

It seems I was mistaken, it only bombs out when I attempt to SetFocus
on the frame. Coming off the frame with SetFocus is working. Any
help on getting SetFocus to work going onto the frame would be
appreciated.

TIA

-Minitman
 
B

Bob Phillips

I am not sure I really understand what you are saying, coming off and going
on to the frame, but have you tried

Frame1.CBox1.SetFocus

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
M

Minitman

Hey Bob,

I just tried this and get the following error message:

Run-time error '2147417113 (8000ffff)':
Unexpected call to method or property access.

What does this mean and how do I fix it????

Any help would be appreciated.

TIA

-Minitman
 

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