Hi all, I need to create a condition in which a input prompt pops up for date entry.
I have two problems currently present in my spreadsheet. The first one is that i need to have the message of the equation
=IF(AND(F10="Pending",M1="Pending"), "Please Enter Date", "")
displayed in the cell upon fulfilling the condition followed by the prompting of entry of the date.
The second problem I currently face is that I can't seem to get the date format to display in the input box as it only displays numbers.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim Rng1 As Range
Dim Prompt As String
Dim Title As String
Dim Date1 As Long
Set Rng1 = Me.Range("A1:A50")
If Intersect(Target(1, 1), Rng1) Is Nothing Then
Exit Sub
End If
Cancel = True
On Error Resume Next
Prompt = "Enter date formatted: mm/dd/yyyy"
Title = "[Please Enter Date]"
Date1 = InputBox(Prompt, Title)
If Err <> 0 Then
On Error GoTo 0
Exit Sub
End If
On Error GoTo 0
Target(1, 1).NumberFormat = "@"
Target(1, 1).Value = Date1 & ""
End Sub
If anyone could provide some help to where I went wrong, that would be greatly appreciated.
Bookmarks