Great. Works perfectly thank you
On May 7, 3:15 pm, merjet <mer...@comcast.net> wrote:
> On May 7, 1:35 pm, stewart <smccallis...@gmail.com> wrote:
>
> > merjet,
> > this does work but is there a way to specify a certain page in a
> > multipage control. Also how do I stop it once it has found an empty
> > textbox.
>
> You can specify the page, stop the Sub and set the focus on the empty
> TextBox as follows.
>
> Dim ctrl As Control
> For Each ctrl In Me.Controls
> If TypeOf ctrl Is MSForms.TextBox And ctrl.Parent.Name = "Page1"
> Then
> If ctrl.Value = "" Then
> MsgBox "fill it"
> ctrl.SetFocus
> Exit Sub
> Else
> MsgBox "its filled"
> End If
> End If
> Next ctrl
>
> Hth,
> Merjet
|