Dim WeekNo as Long
Dim PerYtd as String
WeekNo = Application.InputBox("Enter a week number", type:=1)
If WeekNo <= 0 Then Exit Sub: Rem canceled
Do
PerYtd = Application.InputBox("Enter PERIOD or YTD", type:=2)
If PerYtd = "False" Then Exit Sub: Rem canceled
PerYtd = LCase(PerYtd)
Loop Unil PerYtd = "period" or PerYtd = "ytd"