#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default 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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there an easy Copy/Paste of a Userform ? (Entire Userform Including tx & cbx's) Corey Excel Programming 2 January 9th 07 01:01 PM
Userform to enter values and shown in same userform in list helmekki[_104_] Excel Programming 0 November 19th 05 03:23 PM
Looping procedure calls userform; how to exit loop (via userform button)? KR Excel Programming 6 July 27th 05 12:57 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com[_2_] Excel Programming 3 May 6th 05 05:44 PM
Access from add_in userform to main template userform.... Ajit Excel Programming 1 November 18th 04 05:15 PM


All times are GMT +1. The time now is 09:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"