AW: Daten Lassen sich nicht mehr an die Tabelle übertr
13.09.2013 14:45:26
Christian
Hallo Excelfrende
Private Sub CommandButton_Einfügen_Click()
Dim WS As Worksheet
Dim Loletzte As Long
If MultiPage1.Value = 0 Then
Set WS = Worksheets("MyPortal")
Else
Set WS = Worksheets("OneERP")
End If
With WS
Loletzte = .Cells(.Rows.Count, 2).End(xlUp).Row + 1
.Cells(Loletzte, 2) = TextBox_MyPortal_ID.Value
.Cells(Loletzte, 3) = TextBox_MyPortal_Bezeichnung.Value
.Cells(Loletzte, 4) = TextBox_S1_MyPortal.Value
.Cells(Loletzte, 5) = TextBox_S2_Myportal.Value
.Cells(Loletzte, 6) = TextBox_S3_Myportal.Value
.Cells(Loletzte, 7) = TextBox_S4_MyPortal.Value
.Cells(Loletzte, 8) = TextBox_S5_MyPortal.Value
.Cells(Loletzte, 9) = TextBox_S6_MyPortal.Value
.Cells(Loletzte, 2) = TextBox_OneERP_ID.Value
.Cells(Loletzte, 3) = TextBox_OneERP_Bezeichnung.Value
.Cells(Loletzte, 4) = TextBox_S1_OneERP.Value
.Cells(Loletzte, 5) = TextBox_S2_OneERP.Value
.Cells(Loletzte, 6) = TextBox_S3_OneERP.Value
.Cells(Loletzte, 7) = TextBox_S4_OneERP.Value
.Cells(Loletzte, 8) = TextBox_S5_OneERP.Value
.Cells(Loletzte, 9) = TextBox_S6_OneERP.Value
End With
Me.TextBox_MyPortal_ID = ""
Me.TextBox_MyPortal_Bezeichnung = ""
Me.TextBox_S1_MyPortal = ""
Me.TextBox_S2_Myportal = ""
Me.TextBox_S3_Myportal = ""
Me.TextBox_S4_MyPortal = ""
Me.TextBox_S5_MyPortal = ""
Me.TextBox_S6_MyPortal = ""
Me.TextBox_OneERP_ID = ""
Me.TextBox_OneERP_Bezeichnung = ""
Me.TextBox_S1_OneERP = ""
Me.TextBox_S2_OneERP = ""
Me.TextBox_S3_OneERP = ""
Me.TextBox_S4_OneERP = ""
Me.TextBox_S5_OneERP = ""
Me.TextBox_S6_OneERP = ""
End Sub
Private Sub CommandButton_Schließen_Click()
Unload Me
End Sub
Private Sub Label2_Click()
End Sub
Private Sub TextBox_MyPortal_Bezeichnung_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 65 To 90 'A...Z
CommandButton_Einfügen.Enabled = True
Case 97 To 127 'a...z
CommandButton_Einfügen.Enabled = True
Case Else
CommandButton_Einfügen.Enabled = False
Columns("C:C").EntireColumn.AutoFit
End Select
End Sub
Private Sub TextBox_MyPortal_ID_Change()
If Not IsNumeric(TextBox_MyPortal_ID.Value) Then
CommandButton_Einfügen.Enabled = False
ElseIf IsNumeric(TextBox_MyPortal_ID.Value) Then
CommandButton_Einfügen.Enabled = True
End If
If Me.TextBox_MyPortal_ID.Value = "" Then
CommandButton_Einfügen.Enabled = False
End If
Columns("B:B").EntireColumn.AutoFit
End Sub
Private Sub TextBox_OneERP_ID_Change()
If Not IsNumeric(TextBox_OneERP_ID.Value) Then
CommandButton_Einfügen.Enabled = False
ElseIf IsNumeric(TextBox_OneERP_ID.Value) Then
CommandButton_Einfügen.Enabled = True
End If
Columns("B:B").EntireColumn.AutoFit
End Sub
Private Sub TextBox_OneERP_Bezeichnung_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 65 To 90 'A...Z
CommandButton_Einfügen.Enabled = True
Case 97 To 127 'a...z
CommandButton_Einfügen.Enabled = True
Case Else
CommandButton_Einfügen.Enabled = False
End Select
Columns("C:C").EntireColumn.AutoFit
End Sub
Private Sub TextBox_S1_MyPortal_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 65 To 90 'A...Z
CommandButton_Einfügen.Enabled = True
Case 97 To 127 'a...z
CommandButton_Einfügen.Enabled = True
Case 34 '""
CommandButton_Einfügen.Enabled = True
Case Else
CommandButton_Einfügen.Enabled = False
End Select
Columns("D:D").EntireColumn.AutoFit
End Sub
Private Sub TextBox_S1_OneERP_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 65 To 90 'A...Z
CommandButton_Einfügen.Enabled = True
Case 97 To 127 'a...z
CommandButton_Einfügen.Enabled = True
Case 34 '""
CommandButton_Einfügen.Enabled = True
Case Else
CommandButton_Einfügen.Enabled = False
End Select
Columns("D:D").EntireColumn.AutoFit
End Sub
Private Sub TextBox_S2_Myportal_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 65 To 90 'A...Z
CommandButton_Einfügen.Enabled = True
Case 97 To 127 'a...z
CommandButton_Einfügen.Enabled = True
Case 34 '""
CommandButton_Einfügen.Enabled = True
Case Else
CommandButton_Einfügen.Enabled = False
End Select
Columns("E:E").EntireColumn.AutoFit
End Sub
Private Sub TextBox_S2_OneERP_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 65 To 90 'A...Z
CommandButton_Einfügen.Enabled = True
Case 97 To 127 'a...z
CommandButton_Einfügen.Enabled = True
Case 34 '""
CommandButton_Einfügen.Enabled = True
Case Else
CommandButton_Einfügen.Enabled = False
End Select
Columns("E:E").EntireColumn.AutoFit
End Sub
Private Sub TextBox_S3_Myportal_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 65 To 90 'A...Z
CommandButton_Einfügen.Enabled = True
Case 97 To 127 'a...z
CommandButton_Einfügen.Enabled = True
Case 34 '""
CommandButton_Einfügen.Enabled = True
Case Else
CommandButton_Einfügen.Enabled = False
End Select
Columns("F:F").EntireColumn.AutoFit
End Sub
Private Sub TextBox_S3_OneERP_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 65 To 90 'A...Z
CommandButton_Einfügen.Enabled = True
Case 97 To 127 'a...z
CommandButton_Einfügen.Enabled = True
Case 34 '""
CommandButton_Einfügen.Enabled = True
Case Else
CommandButton_Einfügen.Enabled = False
End Select
Columns("F:F").EntireColumn.AutoFit
End Sub
Private Sub TextBox_S4_MyPortal_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 65 To 90 'A...Z
CommandButton_Einfügen.Enabled = True
Case 97 To 127 'a...z
CommandButton_Einfügen.Enabled = True
Case 34 '""
CommandButton_Einfügen.Enabled = True
Case Else
CommandButton_Einfügen.Enabled = False
End Select
Columns("G:G").EntireColumn.AutoFit
End Sub
Private Sub TextBox_S4_OneERP_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 65 To 90 'A...Z
CommandButton_Einfügen.Enabled = True
Case 97 To 127 'a...z
CommandButton_Einfügen.Enabled = True
Case 34 '""
CommandButton_Einfügen.Enabled = True
Case Else
CommandButton_Einfügen.Enabled = False
End Select
Columns("G:G").EntireColumn.AutoFit
End Sub
Private Sub TextBox_S5_MyPortal_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 65 To 90 'A...Z
CommandButton_Einfügen.Enabled = True
Case 97 To 127 'a...z
CommandButton_Einfügen.Enabled = True
Case 34 '""
CommandButton_Einfügen.Enabled = True
Case Else
CommandButton_Einfügen.Enabled = False
End Select
Columns("H:H").EntireColumn.AutoFit
End Sub
Private Sub TextBox_S5_OneERP_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 65 To 90 'A...Z
CommandButton_Einfügen.Enabled = True
Case 97 To 127 'a...z
CommandButton_Einfügen.Enabled = True
Case 34 '""
CommandButton_Einfügen.Enabled = True
Case Else
CommandButton_Einfügen.Enabled = False
End Select
Columns("H:H").EntireColumn.AutoFit
End Sub
Private Sub TextBox_S6_MyPortal_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 65 To 90 'A...Z
CommandButton_Einfügen.Enabled = True
Case 97 To 127 'a...z
CommandButton_Einfügen.Enabled = True
Case 34 '""
CommandButton_Einfügen.Enabled = True
Case Else
CommandButton_Einfügen.Enabled = False
End Select
Columns("I:I").EntireColumn.AutoFit
End Sub
Private Sub TextBox_S6_OneERP_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 65 To 90 'A...Z
CommandButton_Einfügen.Enabled = True
Case 97 To 127 'a...z
CommandButton_Einfügen.Enabled = True
Case 34 '""
CommandButton_Einfügen.Enabled = True
Case Else
CommandButton_Einfügen.Enabled = False
End Select
Columns("I:I").EntireColumn.AutoFit
End Sub
Warum werden meine Einträge nicht in die Tabelle übertragen. Ich habe das schon mit den Debugger durchlaufen lassen.
Hier mein Code:https://www.herber.de/bbs/user/87267.xlsm
Danke