Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Ich habe eine Datum (heute) und ein Datum dass genau 1 Jahr früher ist. Nun will ich rückwärts alle Montage herraus finden.

Dim i As Integer

Dim heute As Date

Dim em As String

Private Sub UserForm_Activate()

heute = Date

ende = DateAdd("yyyy", -1, heute)

Do

heute = DateAdd("w", -1, heute) 'hier wird der letzte Montag berechnet

em = heute

Loop Until Weekday(heute) = vbMonday

Do While em < ende

ComboBox1.AddItem "Montag, der " & em

em = DateAdd("d", -7, em)

Loop

ComboBox1.ListIndex = 0

End Sub

Als letzten Montag zeigt er mir den 3.10.2005 und bricht dann ab. Wie kann ich nun das Datum richtig vergleichen damit er mir auch die restlichen Tage anzeigt??:eek

Bei mir schon. Folgender Code, in einer .vbs-Datei, erzeugt eine schöne Folge von Messageboxen:

heute = Date
ende = DateAdd("yyyy", -1, heute)

Do
heute = DateAdd("w", -1, heute) 'hier wird der letzte Montag berechnet
em = heute
Loop Until Weekday(heute) = vbMonday

Do While em > ende
msgbox em
em = DateAdd("d", -7, em)
Loop[/code]

  • Autor

wieviele msgboxen??? 3? oder mehr?

Do While em > ende

ComboBox1.AddItem "Montag, der " & em

em = DateAdd("d", -7, em)

Loop

em = 17.10.2005 und ende hat 19.10.2004

Wenn ich es so hab dann geht er nicht in die schleife!

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.