LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Use tab key to move between controls on multipage

I've got several multipage controls on a userform.

Unfortunately, I'm having difficulty moving between the controls on the form
using the tab key. I'm trying to minimize the need to use the mouse on this
userform, so I have added some code in the KeyDown event of many of my
controls (the last one on a particular page of a multipage control) to test
for vbKeyTab. If the tab key is encountered, I run some code similar to:

If KeyCode = vbKeyTab Then
Me.tab_Solutions.Value = 1
Me.txt_Type.SetFocus
End If

Generally, when I am moving between controls on different pages within the
same multi-page, (as above) this works just find. However, when I try to
move between multipages, Excel is not responding as I would expect. I would
expect Excel to set the value of the next multipage control to the first tab
(it does this OK), but when I try to set the focus to a control on this
multipage control, Excel seems to lose track of which control should have the
focus.

If KeyCode = vbKeyTab Then
Me.tab_NextMultipage.Value = 0
Me.tab_NextMultipage.SetFocus
Me.cbo_Soln_Type.SetFocus
End If

Any ideas?

--
Email address is not valid.
Please reply to newsgroup only.
 
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
Initializing UserForm which uses MultiPage controls Patrick Simonds Excel Programming 6 August 15th 06 02:42 AM
Identifying controls on MultiPage Pages Rhumba Excel Programming 2 February 7th 06 03:29 PM
How to loop through controls on a MultiPage 42N83W Excel Programming 11 February 14th 05 11:32 PM
Multipage Controls - Experts Only Dee Veloper[_2_] Excel Programming 1 January 25th 05 11:57 PM
Events for Controls in a Multipage Control George[_18_] Excel Programming 4 February 18th 04 05:56 PM


All times are GMT +1. The time now is 08:36 AM.

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"