Hi everyone,
I've got this piece of code that checks ListBoxes on different MultiPage tabs and asks confirmation from the user before continuing. However, if you don't want to continue it takes you back to the Page that has the missing info.
Problem is, the Page displays blank on my PC without any of the controls. If I select another tab and then the first one again everything is fine.
Any help would be appreciated. Thanks!
Private Sub MultiPage1_Change()
Dim Pg As MSForms.Page
Dim PageControls As Object
Dim num As Integer
If MultiPage1.Value = 8 Then
For Each Pg In MultiPage1.pages
If Pg.Visible = True Then
For Each PageControls In Pg.Controls
If TypeName(PageControls) = "ListBox" Then
If PageControls.ListCount <= 1 Then
If MsgBox("Missing entries in: " + Pg.Caption + vbCrLf + vbCrLf + "Continue?", vbYesNoCancel) = vbYes Then
Unload Me
Value.Show
Else
MultiPage1.Value = Pg.Index
Exit Sub
End If
End If
End If
Next
End If
Next
End If
End Sub
Bookmarks