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

Hello
I cannot understand why this do not work properly on excel 2003 SP2 and it
works ok on excel 2000, both running on windows bxp

userform1
multipage1, pages 1 to 6
textbox1 in page 1

Private Sub MultiPage1_Change()
If MultiPage1.Value = 1 Then
If TextBox1.Value = Empty Then MultiPage1.Value = 0
TextBox1.SetFocus
End If
End Sub

Any ideas?

Thanks



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default multipage

I guess that it is trying to set the focus to a control that is not yet
vis9ible.

You could try this

Private Sub MultiPage1_Change()
If MultiPage1.Value = 1 Then
If TextBox1.Value = Empty Then
Application.OnTime Now(), "MultiPageAction"
End If
End If
End Sub

and in a standard code module add

Sub MultiPageAction()
With UserForm1
.MultiPage1.Value = 0
.TextBox1.SetFocus
End With
End Sub

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"AManso" wrote in message
...
Hello
I cannot understand why this do not work properly on excel 2003 SP2 and it
works ok on excel 2000, both running on windows bxp

userform1
multipage1, pages 1 to 6
textbox1 in page 1

Private Sub MultiPage1_Change()
If MultiPage1.Value = 1 Then
If TextBox1.Value = Empty Then MultiPage1.Value = 0
TextBox1.SetFocus
End If
End Sub

Any ideas?

Thanks





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default multipage

I am the solution you have suggested do not work. I emphasize the code runs
ok in excel 2000 but nor in excel 2003!!!!

"Bob Phillips" wrote:

I guess that it is trying to set the focus to a control that is not yet
vis9ible.

You could try this

Private Sub MultiPage1_Change()
If MultiPage1.Value = 1 Then
If TextBox1.Value = Empty Then
Application.OnTime Now(), "MultiPageAction"
End If
End If
End Sub

and in a standard code module add

Sub MultiPageAction()
With UserForm1
.MultiPage1.Value = 0
.TextBox1.SetFocus
End With
End Sub

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"AManso" wrote in message
...
Hello
I cannot understand why this do not work properly on excel 2003 SP2 and it
works ok on excel 2000, both running on windows bxp

userform1
multipage1, pages 1 to 6
textbox1 in page 1

Private Sub MultiPage1_Change()
If MultiPage1.Value = 1 Then
If TextBox1.Value = Empty Then MultiPage1.Value = 0
TextBox1.SetFocus
End If
End Sub

Any ideas?

Thanks






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
MultiPage tab JWM6[_5_] Excel Programming 4 April 22nd 06 02:06 AM
MultiPage Bill[_30_] Excel Programming 1 January 13th 06 08:22 PM
vba - using multipage ajliaks[_23_] Excel Programming 3 August 9th 04 01:29 PM
MultiPage Michael[_25_] Excel Programming 3 January 6th 04 12:49 PM
Multipage Paul Excel Programming 1 July 9th 03 02:34 PM


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