UserForm
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 |
UserForm
userform1.hide should do it
"Steven" wrote: 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 |
UserForm
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 "dmoney" wrote: userform1.hide should do it "Steven" wrote: 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 |
UserForm
Have you tried userform1.showmodal=false
"Steven" wrote: 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 "dmoney" wrote: userform1.hide should do it "Steven" wrote: 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 |
UserForm
Yes, UserForm1.Show False
"dmoney" wrote: Have you tried userform1.showmodal=false "Steven" wrote: 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 "dmoney" wrote: userform1.hide should do it "Steven" wrote: 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 |
UserForm
not .show, .showmodal
"Steven" wrote: Yes, UserForm1.Show False "dmoney" wrote: Have you tried userform1.showmodal=false "Steven" wrote: 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 "dmoney" wrote: userform1.hide should do it "Steven" wrote: 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 |
UserForm
it returns a "Method or Data Member not found." on the UserForm1.Showmodal =
Fasle "dmoney" wrote: not .show, .showmodal "Steven" wrote: Yes, UserForm1.Show False "dmoney" wrote: Have you tried userform1.showmodal=false "Steven" wrote: 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 "dmoney" wrote: userform1.hide should do it "Steven" wrote: 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 |
UserForm
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. "Steven" wrote: it returns a "Method or Data Member not found." on the UserForm1.Showmodal = Fasle "dmoney" wrote: not .show, .showmodal "Steven" wrote: Yes, UserForm1.Show False "dmoney" wrote: Have you tried userform1.showmodal=false "Steven" wrote: 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 "dmoney" wrote: userform1.hide should do it "Steven" wrote: 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 |
UserForm
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 "dmoney" wrote: 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. "Steven" wrote: it returns a "Method or Data Member not found." on the UserForm1.Showmodal = Fasle "dmoney" wrote: not .show, .showmodal "Steven" wrote: Yes, UserForm1.Show False "dmoney" wrote: Have you tried userform1.showmodal=false "Steven" wrote: 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 "dmoney" wrote: userform1.hide should do it "Steven" wrote: 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 |
All times are GMT +1. The time now is 10:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com