UserForm

S

Steven

I have a UserForm that has a listbox which has the names of files that are
open. When the user clicks an item in the listbox it will go to that file
with:

Workbook(wb).Activate

But the UserForm still has the focus. I have to actually click on the
workbook window to get the scroll to work. How can I get the focus to the
File window from the UserForm after the Workbook(wb).Activate command in the
UserForm without closing the UserForm or doing an Unload UserForm?

Thank you,

Steven
 
S

Steven

Thank you for the response. That hides it but I want the form to show all
the time.

I tried:

UserForm1.Hide
UserForm1.Show

but this hangs up the system, which makes sense. Is there another way to
get the focus to the selected file but keep UserForm1 showing and still
available? There are many files open that can be selected. UserForm1 is a
form in one of the files (a control file.)

Thank you,

Steven
 
D

dmoney

Have you tried userform1.showmodal=false


Steven said:
Thank you for the response. That hides it but I want the form to show all
the time.

I tried:

UserForm1.Hide
UserForm1.Show

but this hangs up the system, which makes sense. Is there another way to
get the focus to the selected file but keep UserForm1 showing and still
available? There are many files open that can be selected. UserForm1 is a
form in one of the files (a control file.)

Thank you,

Steven
 
D

dmoney

you can set it to false in the properties window in design view under the
category behavior.

Let me know if it works as I have never ran into this problem before.
 
S

Steven

Thank you for all your help. It still will not do it. I have tried many
ways to to get the Form to go to the file selected ; stay visible ; and give
the focus to the selected file window but the focus stays with the form
unless the form is hidden after the file is selectd. It is very frustrating.
I just can't get the focus off the form unless I click the file or hide it.
I also have been trying key combinations on the keyboard but the focus will
not move.

If you come accross anything new I appreciate your help.

Thank you,

Steven
 

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