Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
setfocus in textbox on multipage | Excel Programming | |||
setfocus on multipage tab form gives error message | Excel Programming | |||
TextBox SetFocus Problem | Excel Programming | |||
TextBox.SetFocus | Excel Programming |