Treeview Control Not Taking Focus

G

Guest

I have a UserForm with a single Control. It's a TreeView Control from
Microsoft Common Controls 6.0 (MSCOMCTL.OCX). When I call the UserForm's
Show Method, the Form shows with the Window Borders highlighted like it's got
focus but the TreeView Control has no Node highlighted and doesn't react to
any keyboard input until I Click on something inside the Treeview Control. I
have my SelectedItem Property set and verified in the Debugger. I tried
calling the Treeview's SetFocus Method both prior to Show and inside the
UserForm's Activate Event. I'm using XL 2000 (9.0.2720) on XP Pro SP2. I'd
appreciate any ideas. Thanks!
 
G

Guest

Actually, there's one Key it does respond to. It'll expand and collapse the
Selected (although unhighlighted) Node when I press the Enter Key repeatedly.
I couldn't find any other Key that it responds to.

I've since added a couple of CommandButton's to the UserForm and was able to
make the TreeView take Focus by sending a Tab Shift-Tab combination with
Application.SendKeys. I'd still appreciate it if anyone's knows a more
elegant programmatic way. Thanks!
 

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