Results 1 to 13 of 13

vba excel - Parental control multipage userform runtime error 438

Threaded View

  1. #11
    Registered User
    Join Date
    10-07-2017
    Location
    Perth, Down Under
    MS-Off Ver
    2016
    Posts
    45

    Re: vba excel - Parental control multipage userform runtime error 438

    Have you tried something like this:

        For Each Ctrl In Controls
            If TypeOf Ctrl Is msforms.TextBox Then
                If TypeOf Ctrl.Parent Is msforms.Page Then
                    If Ctrl.Value = "" And Ctrl.Visible = True And Ctrl.Enabled = True Then
                        Ctrl.BackColor = vbYellow
                        Ctrl.Parent.Parent.Value = Ctrl.Parent.Index
                        Ctrl.SetFocus
                        MsgBox Ctrl.Name & " is required.", vbOKOnly, "Missing Item"
                        Exit Sub
                    End If
                Else
                    If Ctrl.Value = "" And Ctrl.Visible = True And Ctrl.Enabled = True Then
                        Ctrl.BackColor = vbYellow
                        MsgBox Ctrl.Name & " is required.", vbOKOnly, "Missing Item"
                        Ctrl.SetFocus
                        Exit Sub
                    End If
                End If
            End If
        Next Ctrl
    hth
    Last edited by Ozex; 10-09-2017 at 03:57 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 03-08-2016, 08:47 PM
  2. [SOLVED] Repositioning a Commandbutton in a UserForm multipage control
    By newbi004 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-27-2014, 09:52 AM
  3. [SOLVED] ActiveControl - Return non-Multipage control when Form contains Multipage?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-04-2014, 08:37 PM
  4. [SOLVED] Userform multipage control exit events code execution not completed before next user entry
    By jane serky in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-10-2013, 04:39 AM
  5. Userform Multipage User Control Lock
    By gsurge in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-23-2011, 10:25 AM
  6. add a second layer to multipage control on userform
    By smokebreak in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-02-2011, 05:14 PM
  7. Reference Userform Multipage Control
    By kingdt in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-03-2010, 06:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1