#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default UserForm

I have a UserForm with a drop box. The drop box has all of the worksheets in
the workbook, so when the user clicks the worksheet name, it will become the
active workbook on the screen. So far, so good.

After I drop down the drop box and select the worksheet name, I want the
active worksheet to have the focus, not the userform. However, the cursor
stays in the drop box and I have to manually click in the worksheet to get
the focus there. I have used ActiveSheet.Select, but the focus stays with
the userform drop box.

Any ideas.

Thanks,

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default UserForm

Steve,

I think what you are looking for is the following command.

UserForm1.Hide

Add this at the point you want your sheet to become active, and you should
have no problem. Note that this command hides the form, but the form is
still running. You can then either show the form again (UserForm1.Show) or
end the form's operation (Unload UserForm1).

Dave

"Steve" wrote:

I have a UserForm with a drop box. The drop box has all of the worksheets in
the workbook, so when the user clicks the worksheet name, it will become the
active workbook on the screen. So far, so good.

After I drop down the drop box and select the worksheet name, I want the
active worksheet to have the focus, not the userform. However, the cursor
stays in the drop box and I have to manually click in the worksheet to get
the focus there. I have used ActiveSheet.Select, but the focus stays with
the userform drop box.

Any ideas.

Thanks,

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default UserForm

Thanks Dave.

I don't really want to hide the form, rather use it as a "toolbar" so that
the users can continue to use the drop box to get to different tabs. I just
want them to select a tab from the form, have that tab become the active
sheet, and have the focus be set to the sheet in the current cell. I want
the user form to stay open and available, but the cursor to be in the
spreadsheet. Make any sense?


"drhalter" wrote:

Steve,

I think what you are looking for is the following command.

UserForm1.Hide

Add this at the point you want your sheet to become active, and you should
have no problem. Note that this command hides the form, but the form is
still running. You can then either show the form again (UserForm1.Show) or
end the form's operation (Unload UserForm1).

Dave

"Steve" wrote:

I have a UserForm with a drop box. The drop box has all of the worksheets in
the workbook, so when the user clicks the worksheet name, it will become the
active workbook on the screen. So far, so good.

After I drop down the drop box and select the worksheet name, I want the
active worksheet to have the focus, not the userform. However, the cursor
stays in the drop box and I have to manually click in the worksheet to get
the focus there. I have used ActiveSheet.Select, but the focus stays with
the userform drop box.

Any ideas.

Thanks,

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default UserForm


something along these lines


Code
-------------------

Sheets(ComboBox1.Text).Activate
AppActivate "Microsoft Excel"

-------------------

--
Ivan F Moal

-----------------------------------------------------------------------
Ivan F Moala's Profile: http://www.excelforum.com/member.php...nfo&userid=195
View this thread: http://www.excelforum.com/showthread.php?threadid=38763

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default UserForm

Ivan,

Thank you, thank you. You have no idea how much this has helped. I can
stop pulling my hair out!

I greatly appreciate the help!

"Ivan F Moala" wrote:


something along these lines


Code:
--------------------

Sheets(ComboBox1.Text).Activate
AppActivate "Microsoft Excel"

--------------------


--
Ivan F Moala


------------------------------------------------------------------------
Ivan F Moala's Profile: http://www.excelforum.com/member.php...fo&userid=1954
View this thread: http://www.excelforum.com/showthread...hreadid=387631


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
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
Linking userform to userform in Excel 2003 missmelis01 Excel Programming 2 August 27th 04 08:07 PM
Userform inside another userform Ryan Excel Programming 0 April 23rd 04 08:01 PM
userform Mauro Excel Programming 2 January 26th 04 09:49 AM


All times are GMT +1. The time now is 10:50 PM.

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

About Us

"It's about Microsoft Excel"