View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Data Validation with an InputBox


I believe you need to use the "other" input box. The one without the
"Application" prefix...
'---------------------------
Sub HappyBirthday()
Dim varDate As Variant
varDate = InputBox("Enter the birthday as MM/DD/YYYY", _
"Tom Wants to Know", Format$(Date, "mm/dd/yyyy"))
If Len(varDate) = 0 Then
Exit Sub
Else
'verify entry and do something with it.
End If
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"TomD"
wrote in message
I'm trying to input my data using an InputBox, and also use the data
validations in the cells. I'm trying to follow the following instructions
from the Help File:
-snip-
My code:
' Get the Birthday
'
myCell = ActiveCell.Offset(rowOffset:=0, columnOffset:=1).Activate
On Error GoTo CleanUp
Set myCell = Application.InputBox(Prompt:="Enter The Birthday
MM/DD/YYYY", Type:=8)

================================================== ==

I have tried numerous variations, and all have failed. Any assistance would
be greatly appreciated.

TomD