hat jemand eine Idee warum ich o.g. Fehlermeldung bekomme, obwohl der u.g. Code in einer anderen Datei wunderbar funktioniert. Kann mir jemand die Fehlermeldung mal etwas besser erklären???
Vielen Dank für Eure Mühen
Andreas
Private Sub ComboBox1_Change()
mark1 = ComboBox1.ListIndex
mark2 = ComboBox2.ListIndex
mark3 = ComboBox3.ListIndex
If mark1 >= 0 And mark2 >= 0 And mark3 >= 0 Then tfText.Visible = True
End Sub
Private Sub ComboBox2_Change()
mark1 = ComboBox1.ListIndex
mark2 = ComboBox2.ListIndex
mark3 = ComboBox3.ListIndex
If mark1 >= 0 And mark2 >= 0 And mark3 >= 0 Then tfText.Visible = True
End Sub
Private Sub ComboBox3_Change()
mark1 = ComboBox1.ListIndex
mark2 = ComboBox2.ListIndex
mark3 = ComboBox3.ListIndex
If mark1 >= 0 And mark2 >= 0 And mark3 >= 0 Then tfText.Visible = True
End Sub
Private Sub CommandButton1_Click()
'Kostenstelle
text1 = ComboBox1.Text
'Kalenderwoche
text2 = ComboBox2.Text
'ScoreCardPoint
text3 = ComboBox3.Text
Set c = Sheets(text1).Range("A4:A100").Find(text2, LookIn:=xlValues)
If Not c Is Nothing Then
Zeile = c.Row
Else
MsgBox text1 & " nicht gefunden!"
End If
Set b = Sheets(text1).Range("B1:D1").Find(text3, LookIn:=xlValues)
If Not c Is Nothing Then
Spalte = b.Column
Else
MsgBox text2 & " nicht gefunden!"
End If
If Not tfText = "" Then
If IsNumeric(tfText) Then
Sheets(text1).Cells(Zeile, Spalte).Value = CDbl(tfText.Text)
Call Summe_anzeigen
Else
Sheets(text1).Cells(Zeile, Spalte).Value = tfText.Text
End If
Else
MsgBox "Wert in Textfeld eingeben!"
tfText.SetFocus
End If
End Sub
Private Sub UserForm_Initialize()
Dim wks As Worksheet
'Auswahl der Kostenstelle
ComboBox1.AddItem "314"
ComboBox1.AddItem "315"
ComboBox1.AddItem "353"
ComboBox1.AddItem "451"
ComboBox1.AddItem "452"
ComboBox1.AddItem "453"
ComboBox1.AddItem "454"
ComboBox1.AddItem "455"
'Auswahl der Kalenderwoche
For i = 1 To 52
ComboBox2.AddItem ("KW" & i)
Next i
'Auswahl der ScoreCardPoints
ComboBox3.AddItem "SOS Bewertung"
ComboBox3.AddItem "Gesundheitsquote"
ComboBox3.AddItem "Kapazitätsverlust"
End Sub