View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Preschool Mike Preschool Mike is offline
external usenet poster
 
Posts: 33
Default Help with InputBox and MsgBox

How do I fix the below code so if a user does not enter anything in the input
box or clicks on the cancel button they get what I have in the MsgBox?

MsgBox ("You did not enter a new pay period start date" & vbCrLf & _
"click on the 'EnterNewPayPeriod' button and re-enter the new pay period")

Sub NewStartDate()
Dim Prompt, Title As String
Prompt = "What's the new pay period start date?"
Title = "Start Date"
StartDate = InputBox(Prompt, Title)

End Sub
--
Mike Mast
Special Education Preschool Teacher