Hello guys I am completely stumped as to why this bit of code is not working. Can anybody help?
Sub test()
Dim RpDate As Variant
Dim x As String
RpDate = InputBox("Enter Date", "Date")
If RpDate = "" Then Exit Sub
x = Day(RpDate)
MsgBox x
End Sub