[b]Option Explicit
Function EDatum_VBA(Ausgangsadtum As Date, Monate As Integer) As Date
EDatum_VBA = DateSerial(Year(Ausgangsadtum), Month(Ausgangsadtum) + Monate, _
Application.WorksheetFunction.Min(Day(Ausgangsadtum), _
Day(DateSerial(Year(Ausgangsadtum), 1 + Month(Ausgangsadtum) + Monate, 0))))
End Function[/b]
Sub main()
MsgBox tage360("01.01.2007", "31.12.2007")
End Sub
Function tage360(d1, d2)
Cells(1, 1) = d1
Cells(2, 1) = d2
Range("A3").FormulaR1C1 = "=DAYS360(R[-2]C,R[-1]C)"
tage360 = Cells(3, 1)
End Function
Excel schließen (VBA)
Jugo 15.03.2007 - 311 Hits - 1 Antwort
Formeln Excel
MathiG 13.06.2007 - 185 Hits - 2 Antworten
Excel VBA: Berechnung ausschalten?
Rolf___ 06.08.2007 - 137 Hits - 2 Antworten
Schnellreferenz Excel VBA
Joshuan 23.05.2008 - 219 Hits - 3 Antworten
VBA-Excel
mentosbasi 28.05.2008 - 349 Hits - 3 Antworten