Blubbfisch
Mitglied
Weiß jemand wie ich mit VB das Datum vom folgenden Freitag berechnen lassen kann?
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
Weekday(Date)
Option Explicit
Private Sub Command1_Click()
Dim dDatum As Date
Dim nValue As Integer
Dim nTarget As Integer
nTarget = vbFriday
dDatum = Date + CInt(Text1.Text)
nValue = nTarget - Weekday(dDatum)
nValue = IIf(nValue <= 0, nValue + 7, nValue)
dDatum = dDatum + nValue
MsgBox "Der nächste " & Format$(dDatum, "DDDD") & " ist " & dDatum
End Sub