View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mark Driscol[_2_] Mark Driscol[_2_] is offline
external usenet poster
 
Posts: 75
Default Inputbox Default to be Upcomming Sunday

Sub Temp()

Dim intDOW As Integer
Dim DT As String
Dim datNewDate As Date

intDOW = Weekday(Date, vbSunday)
datNewDate = Date + (7 - intDOW + 1)

DT = InputBox("Enter New Date: ", datNewDate)
' The rest of your code goes here

End Sub

Note that to display the next Sunday in the InputBox, not its title,
you would use


DT = InputBox("Enter New Date: ", , datNewDate)

Mark


Brian wrote:
I have a input box that is looking for a date.

DT = InputBox("Enter New Date: ", Date)

I would like have the default value of the inputbox as the upcomming
sunday( Today is 6-29-06 default value should show 7-2-06)

Thanks in advance