Hier mein Code:
Code:
Private Sub UserForm_Initialize()
Dim LetzteZeile1(0 To 2) As Long
Dim LetzteZeile2(0 To 2) As Long
Dim LetzteZeile3(0 To 2) As Long
Dim LetzteZeile4(0 To 2) As Long
Dim LetzteZeile5(0 To 3) As Long
Dim LetzteZeile6(0 To 3) As Long
Dim LetzteZeile7(0 To 3) As Long
Dim LetzteZeile8(0 To 2) As Long
Dim LetzteZeile9(0 To 2) As Long
Dim FlagSPN As Integer
Dim FlagSDyx As Integer
Dim FlagOPN As Integer
Dim FlagODyx As Integer
Dim FlagCPN As Integer
Dim FlagCDyx As Integer
Dim FlagBPN As Integer
Dim FlagBDyx As Integer
Dim FlagC1Name As Integer
Dim FlagC1PN As Integer
Dim FlagC1Dyx As Integer
Dim FlagC2Name As Integer
Dim FlagC2PN As Integer
Dim FlagC2Dyx As Integer
Dim FlagC3Name As Integer
Dim FlagC3PN As Integer
Dim FlagC3Dyx As Integer
Dim FlagO1PN As Integer
Dim FlagO1Dyx As Integer
Dim FlagO2PN As Integer
Dim FlagO2Dyx As Integer
Dim ws As Worksheet
Set ws = Worksheets("Sensorlist")
FlagSPN = 0
FlagSDyx = 0
FlagOPN = 0
FlagODyx = 0
FlagCPN = 0
FlagCDyx = 0
FlagBPN = 0
FlagBDyx = 0
FlagC1Name = 0
FlagC1PN = 0
FlagC1Dyx = 0
FlagC2Name = 0
FlagC2PN = 0
FlagC2Dyx = 0
FlagC3Name = 0
FlagC3PN = 0
FlagC3Dyx = 0
FlagO1PN = 0
FlagO1Dyx = 0
FlagO2PN = 0
FlagO2Dyx = 0
Code:
Private Sub SPN_DropButtonClick()
FlagSPN = 1
SDyx.ListIndex = SPN.ListIndex
End Sub
Private Sub SPN_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If FlagSPN = 1 Then SDyx.ListIndex = -1
FlagSPN = 0
End Sub
Vielleicht einer ne Idee?
Greetz und Danke im Vorraus
Psus82