Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default How to re-set focus to the text box after deleting invalid data?

Hi Vinay,

Tou can use the exit event for the textbox:

Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Not IsDate(TextBox1.Text) Then
MsgBox "DATE ENTERED IS INVALID. PLEASE RE-ENTER",
vbExclamation, "Retry"
Me.TextBox1.Text = ""
Cancel = True
End If
End Sub

Hoop This Helps

Wouter

Reply
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
ADDING/DELETING SHEET Without losing focus? Faraz A. Qureshi Excel Discussion (Misc queries) 1 July 29th 09 12:55 PM
Text Box has the focus Spencer Hutton Excel Programming 1 April 1st 05 02:29 AM
Text Box Focus Tim Coddington Excel Programming 1 July 25th 04 04:27 AM
Deleting Invalid Links stan sitek Excel Programming 3 October 7th 03 03:11 AM
Text Box Set Focus Issue John Flynn Excel Programming 1 September 6th 03 07:24 PM


All times are GMT +1. The time now is 09:09 PM.

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"