Validating check box
Sub inputbox() Dim Manager As Long On Error Resume Next Application.
Display Alerts = False Manager = Application.inputbox(Prompt:="Please enter a manager.", Title:="Pick A Manager Name", Type:=1) On Error Go To 0 Application.
You can also validate by requiring the user to select a minimum of one value or two value according to your requirement.
The first example shows how to validate a checkbox if nothing is checked.
Sure there have been all kinds of whacky plug-ins over the years aimed at achieving this, but never a single standard that we could work towards.
Before you ask, and someone always does, these examples will currently work in the following browsers: Safari 5, Chrome 6, Opera 9, Firefox 4 Beta and the i Phone/i Pad.Obviously neither example is very limiting, but it will prevent people from entering completely wrong values, such as phone number, strings with multiple '@'s or spaces.Here is how it appears in Safari (with our CSS formatting to show the (in)valid state): In a similar fashion to the Again, the input box appears as normal: This time the minimum requirement for most browsers is one or more letters followed by a colon. :[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f] | \[\x01-\x09\x0b\x0c\x0e-\x7f]) ) \])\z Or you can look here for more solutions.Using CSS you can place markers inside or alongside the input box, or simply use background colours and borders as some browsers do by default. On the i Phone/i Pad the different input types are associated with different keyboards, making it easier for people to complete your online forms.In other web browsers they can be used in combination with the .