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: 258
Default MultiPage exit/change event

I use a MultiPage control to gather data and have it placed on my
worksheets. I have code which causes the data to be placed on the worksheet
when you exit one (of 10) TextBox for another, my problem is if the user
clicks on the next page of the MultiPage control, Excel does not recognize
it as an exit event from a TextBox. So the value is not placed on the
worksheet.

I used this approach (as opposed to just placing the data on the worksheet
upon closing the UserForm,which is easy) because I have a TextBox on the
UserForm which must be updated as numbers are entered. Now someone suggested
that I use the code below.

As you can see I want to apply this code to MultiPage2. I tried many
variants of the suggested code, but was not able to get more than the first
page to update when I clicked to another page. MultiPage2 control has 6
pages (January, February, March, April, May, June). This is where I am now,
but again it only works when I click from January to any of the other pages.

Proposed code:

Private Sub YourMultiPage_Change()
If MultiPage.Value = 0 Then 'First Page
'TextBox handling here
End If
End Sub



Adapted Code:

Private Sub MultiPage2_Change()

If MultiPage2.Value = 0 Then
PopulateWorksheets.PopulateWorksheets

ElseIf MultiPage2.Value = 1 Then
PopulateWorksheets.PopulateWorksheets

ElseIf MultiPage2.Value = 2 Then
PopulateWorksheets.PopulateWorksheets

ElseIf MultiPage2.Value = 3 Then
PopulateWorksheets.PopulateWorksheets

ElseIf MultiPage2.Value = 4 Then
PopulateWorksheets.PopulateWorksheets

ElseIf MultiPage2.Value = 5 Then
PopulateWorksheets.PopulateWorksheets

End If

End Sub


 
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
exit event John Pierce Excel Programming 3 February 2nd 06 01:00 AM
Stoppoing ComboBox Change Event from firing when Multipage changes GH[_2_] Excel Programming 0 December 22nd 04 03:56 PM
Deactivating Multipage Change Event [email protected] Excel Programming 0 September 9th 04 03:13 AM
Deactivating Multipage Change Event [email protected] Excel Programming 2 September 9th 04 02:49 AM
Exit Event Michael J. Malinsky Excel Programming 1 February 27th 04 06:40 PM


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