Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2003, can't setfocus in a textbox inside a multipage, tab key don work!

HI,
After create a MS form multipage with 2 pages on sheet1,each page with 2
textboxes.I want the focus on the first textbox of the page as soon as the
page is selected. When I exit the design mode and change the pages, nothing
happens, even the tab key does not move the focus between the textboxes. Code
is below

Private Sub MultiPage1_Change()
If MultiPage1.Value = 0 Then
MultiPage1.Pages(MultiPage1.Value).TextBox1.SetFoc us
Else
MultiPage1.Pages(MultiPage1.Value).TextBox3.SetFoc us
End If

I tried to put this code like above (this button is outside the multipage).
If I click the button, nothing happen, but if I run from inside the VB it
setfocus.

Private Sub CommandButton1_Click()

If MultiPage1.Value = 0 Then
MultiPage1.Pages(MultiPage1.Value).TextBox1.SetFoc us
Else
MultiPage1.Pages(MultiPage1.Value).TextBox3.SetFoc us
End If

Any idea why it happens ?? If I use a MS frame instead a MS Multipage I have
no problem with this ...

Thanks for any help...
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
setfocus in textbox on multipage Martin Excel Programming 5 January 6th 06 04:20 AM
setfocus on multipage tab form gives error message Cheryl Excel Programming 3 July 28th 04 03:07 PM
TextBox SetFocus Problem Tom Ogilvy Excel Programming 1 September 12th 03 01:27 PM
TextBox.SetFocus steve Excel Programming 4 July 16th 03 07:40 PM


All times are GMT +1. The time now is 03:46 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"