Chcel som niečo také:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim den As Integer = InputBox("Zadaj deň v týždni", "Deň v tyždni")
If den - Now.DayOfWeek = 0 Then
den = 7
ElseIf den - Now.DayOfWeek < 0 Then
den = den - Now.DayOfWeek + 7
Else
den = den - Now.DayOfWeek
End If
MsgBox(Now.AddDays(den).ToString("dd.MM.yyyy"))
End Sub
|