Makroanpassung
09.09.2008 10:32:00
Ernst
Bei diesem Code wird das gesamte Blatt durchsucht ich möchte aber Spalten definieren in denen gesucht wird wie muss der Code aussehen damit das möglich ist ?
wäre für Lösungsvorschläge sehr dankbar.
Lg.Ernst
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
b = TextBox1.Value
c = Len(b)
x = y
If KeyCode = 13 Then
If c > 2 Then
On Error GoTo ende
Cells.Find(What:=b, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
'Range("P104").Value = b
'TextBox1.Value = ""
Exit Sub
ende:
'TextBox1.Value = ""
MsgBox "Wagen Nr. nicht vorhanden !!"
End If
End If
End Sub