AW: Jetzt Fehlermeldung, warum ?
02.02.2004 18:03:09
Walter
Hallo Dirk,
die Abfrage funktioniert, jedoch habe ich jetzt eine Fehlermeldung in der Zeile:
ActiveCell = Format(TextBox1, "dd.mm.yyyy")
Laufzeitfehler 13
Typen unverträglich
und in meine ActiveCell wird anstelle das Datum: 02.01.2004
folgendes geschrieben: 04.09.7408
Hier mein UserForm Makro:
Private Sub UserForm_Initialize()
TextBox1 = ActiveCell
Label10.Caption = Format(ActiveCell.Offset(0, 1).Value)
Label22.Caption = Format(ActiveCell.Offset(0, 2).Value, ("00 000 00000"))
Label23.Caption = Format(ActiveCell.Offset(0, 3).Value)
TextBox2 = Format(ActiveCell.Offset(0, 4).Value) 'Unfall etc.
Label24.Caption = Format(ActiveCell.Offset(0, 5).Value) 'Erstzulassung
TextBox3 = Format(ActiveCell.Offset(0, 9).Value, ("#,###")) 'KM
Label25.Caption = Format(ActiveCell.Offset(0, 10).Value, ("#,000.00")) 'Netto-Preis
Label26.Caption = Format(ActiveCell.Offset(0, 11).Value, ("#,000.00")) 'Transport
TextBox7 = Format(ActiveCell.Offset(0, 12).Value, ("0.00")) 'Kulanz
Label30.Caption = Format(ActiveCell.Offset(0, 15).Value, ("#,000.00"))
Label31.Caption = Format(ActiveCell.Offset(0, 16).Value, ("#,000.00"))
TextBox4 = Format(ActiveCell.Offset(0, 17).Value, ("0.00"))
TextBox5 = Format(ActiveCell.Offset(0, 18).Value, ("0.00"))
TextBox6 = Format(ActiveCell.Offset(0, 19).Value, ("0.00"))
'------------------ ab hier in VF-Blatt kopieren ----------------------------------
'Worksheets("VF-Blatt").Range("G7").Value = Format(ActiveCell.Value, ("dd.mm.yyyy"))
Worksheets("VF-Blatt").Range("G7").Value = ActiveCell.Value
' so kopiertAbmeldedatum in VF-Blatt
Worksheets("VF-Blatt").Range("C6").Value = ActiveCell.Offset(0, 1).Value
' so kopiert Typ in VF-Blatt
Worksheets("VF-Blatt").Range("E9").Value = ActiveCell.Offset(0, 2).Value
' so kopiert Auftrags.Nr. in VF-Blatt
Worksheets("VF-Blatt").Range("E6").Value = ActiveCell.Offset(0, 3).Value
' so kopiert Kennzeichen in VF-Blatt
Worksheets("VF-Blatt").Range("G9").Value = ActiveCell.Offset(0, 4).Value
' so kopiert Unfälle etc. in VF-Blatt
Worksheets("VF-Blatt").Range("G6").Value = ActiveCell.Offset(0, 5).Value
' so kopiert Erstzullas. in VF-Blatt
Worksheets("VF-Blatt").Range("C9").Value = ActiveCell.Offset(0, 9).Value
' so kopiert KM in VF-Blatt
Worksheets("VF-Blatt").Range("I15").Value = ActiveCell.Offset(0, 10).Value
' so kopiert Netto-Listen-Preis in VF-Blatt
Worksheets("VF-Blatt").Range("I11").Value = ActiveCell.Offset(0, 11).Value
' so kopiert Transport-Netto in VF-Blatt
Worksheets("VF-Blatt").Range("E23").Value = ActiveCell.Offset(0, 12).Value
' so kopiert Kulanz in VF-Blatt
Worksheets("VF-Blatt").Range("D32").Value = ActiveCell.Offset(0, 17).Value
' so kopiert NDL-Prov. in VF-Blatt
Worksheets("VF-Blatt").Range("D33").Value = ActiveCell.Offset(0, 18).Value
' so kopiert Zusatz-Prov. in VF-Blatt
Worksheets("VF-Blatt").Range("D34").Value = ActiveCell.Offset(0, 19).Value
' so kopiert Bonus in VF-Blatt
'Worksheets("VF-Blatt").Range("D35").Value = Label28.Caption
' so kopiert NDL-Gesamt-Prov. in VF-Blatt
Label27.Caption = Format(Worksheets("VF-Blatt").Range("G14").Value, ("#,000.00"))
'Netto inkl.Transp
Label29.Caption = Format(Worksheets("VF-Blatt").Range("G17").Value, ("#,000.00"))
'Brutto inkl.Transp
Label28.Caption = Format(Worksheets("VF-Blatt").Range("D35").Value, ("0.00"))
'NDL Gesamt-Prov.
TextBox1 = " "
TextBox1.SetFocus
With TextBox1
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With
TextBox1 = ActiveCell
TextBox1.SetFocus
With TextBox1
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
Gruss Walter