Dim x As Integer
Dim J As Integer
J = 11
Dim DateArray(11) As String
Dim MonthArray(11) As String
For x = 0 To 11
Set newdate = New NotesDateTime(Today)
Call newdate.AdjustMonth(-J)
DateArray(x) = Month(newdate.lslocaltime) & "/" & 1 & "/" & Year(newdate.lslocaltime)
MonthArray(x) = GetMonthAndYear(J)
J = J - 1
Next
Dim SelectedMonth As Variant
Do While SelectedMonth = ""
SelectedMonth = workspace.Prompt( PROMPT_OKCANCELLIST, "Choose Month", "Please select a month/year for the report categorization.", MonthArray(11) , MonthArray )
Loop
Dim FinalDate As String
Select Case SelectedMonth
Case MonthArray(0) : thisdoc.PostedDate = Cdat(DateArray(0))
Case MonthArray(1) : thisdoc.PostedDate = Cdat(DateArray(1))
Case MonthArray(2) : thisdoc.PostedDate = Cdat(DateArray(2))
Case MonthArray(3) : thisdoc.PostedDate = Cdat(DateArray(3))
Case MonthArray(4) : thisdoc.PostedDate = Cdat(DateArray(4))
Case MonthArray(5) : thisdoc.PostedDate = Cdat(DateArray(5))
Case MonthArray(6) : thisdoc.PostedDate = Cdat(DateArray(6))
Case MonthArray(7) : thisdoc.PostedDate = Cdat(DateArray(7))
Case MonthArray(8) : thisdoc.PostedDate = Cdat(DateArray(8))
Case MonthArray(9) : thisdoc.PostedDate = Cdat(DateArray(9))
Case MonthArray(10) : thisdoc.PostedDate = Cdat(DateArray(10))
Case MonthArray(11) : thisdoc.PostedDate = Cdat(DateArray(11))
End Select
Call thisdoc.Save(True, True)