Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pop-up Error Messages
Does anyone know how to generate a pop-up message when exiting a form
if 'txtFieldA' is left blank (""), that reads: "Please fill in txtFieldA." Thank -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pop-up Error Messages
Best to have a button for exiting so that you can control it. The code
behind the button would be something like Private Sub cmdExit_Click() If txtFieldA.Text = "" Then MsgBox "Must input this field" With txtFieldA .SelStart = 1 .SetFocus End With Else Me.Hide End If End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "rbaxter " wrote in message ... Does anyone know how to generate a pop-up message when exiting a form, if 'txtFieldA' is left blank (""), that reads: "Please fill in txtFieldA." Thanks --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pop-up Error Messages
|
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pop-up Error Messages
You could use the Userform_QueryClose event, which is
fired when the form is closed. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error Messages | Excel Worksheet Functions | |||
#N/A error messages | New Users to Excel | |||
Error Messages | Excel Discussion (Misc queries) | |||
Error Messages | Excel Worksheet Functions | |||
Error Messages | Excel Worksheet Functions |