THis won't work: Wrong Event
Try thisPrivate Sub MultiPage1_Change() dim contr as object For Each contr In UserForm1.Controls If TypeName(contr) = "ComboBox" Then If contr.ListIndex = -1 Then MsgBox " you have incomplete answers" Exit Sub End If End If Next End SubUse the Go Advanced button to upload attachmentsOption Explicit Private Sub CommandButtonX_Click() 'Replace CommandButtonX with your button name. Dim Pg As Object, Ctrl As Object For Each Pg In MultiPage1.Pages For Each Ctrl In Pg.Controls If TypeName(Ctrl) = "ComboBox" Then If Ctrl.ListIndex = -1 Then MsgBox "You have incomplete answers on Page " & Pg.Caption Pg.SetFocus 'Redundant Ctrl.SetFocus Exit Sub End If End If Next Next End Sub




Reply With Quote
