AW: Benötige MAKRO Für Datum & Zeit !!!
06.12.2007 14:11:00
Leo
Tag Sepp,
aber ich raff`s einfach nicht !!!
Kann mich nur wiederholen - und meine Körpertemperatur steigt weiter ...
Der Punkt ist, wenn ich die Mappe öffne und dann einfach auf das Datum Button klicke, dann kommt immer folgende fehlermeldung :
Microsft Forms
Could not load some objects because they are not avaible on this machine
und wenn ich dann auf OK drücke komm` ich in den VB-Bereich, wo ich offen gestanden keinen Plan habe !!!
Ich hab` hier einmal den VB reinkopiert ...
Option Explicit
Private Sub CommandButton1_Click()
Dim lngS As Long, lngE As Long, lngI As Long, lngR As Long
Dim intI As Integer
Range("A2:B" & Rows.Count).ClearContents
lngR = 2
lngS = Application.Min(DTPicker1, DTPicker2)
lngE = Application.Max(DTPicker1, DTPicker2)
If (lngE - lngS + 1) * 24 + lngR - 1 > Rows.Count Then
If MsgBox("Zuviele Tage für diese Tabelle!" & vbLf & _
"Soll das Enddatum korrigiert werden?", vbOKCancel + vbQuestion, "Hinweis") = vbOK Then
lngE = (lngS + Int((Rows.Count - lngR - 1) / 24) - 1)
Else
Exit Sub
End If
End If
On Error GoTo ErrExit
GMS
For lngI = lngS To lngE
For intI = 0 To 23
Cells(lngR, 1) = CDate(lngI)
Cells(lngR, 2) = TimeSerial(intI, 0, 0)
lngR = lngR + 1
Next
Next
ErrExit:
GMS True
Unload Me
End Sub
Private Sub UserForm_Activate()
DTPicker1 = DateSerial(2001, 1, 1)
DTPicker2 = Date
End Sub
Sub GMS(Optional ByVal Modus As Boolean = False)
Static lngCalc As Long
With Application
.ScreenUpdating = Modus
.EnableEvents = Modus
.DisplayAlerts = Modus
.EnableCancelKey = IIf(Modus, 1, 0)
If Modus Then
.Calculation = IIf(lngCalc 0, lngCalc, xlCalculationAutomatic)
Else
lngCalc = .Calculation
.Calculation = xlCalculationManual
End If
.Cursor = IIf(Modus, -4143, 2)
.CutCopyMode = False
End With
End Sub
Ich bräuchte das Kalendarium vom 01.01.2001 (00:00:00) bis heute ...
Wo muss ich das einfügen !? ?! !?
Dank Dir/Euch schon jetzt :
Leo van der Haydn