LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Check all textboxes

Great. Works perfectly thank you

On May 7, 3:15 pm, merjet wrote:
On May 7, 1:35 pm, stewart 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





 
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
If Then's for 12 textboxes to check if they are empty. Beertje Excel Discussion (Misc queries) 3 October 27th 05 02:34 PM
Textboxes Subs Excel Programming 2 September 28th 05 08:49 PM
check is input textboxes is numeric on userform Jean-Pierre D via OfficeKB.com Excel Programming 7 August 16th 05 08:15 PM
sum of textboxes Liedson31 Excel Programming 1 May 3rd 05 06:18 PM
textboxes libby Excel Programming 5 April 13th 04 06:32 PM


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