- Katılım
- 6 Şubat 2014
- Mesajlar
- 30
- Excel Vers. ve Dili
- excel 2010
Selamlar ,
Hücreye tıkladığımda Combo box açılıyor ve girdiğim karakterleri yalnızca ilk harf olarak sorgulama değil de kalimenin ya da cümlenin tamamında sorgulamasını istiyorum.
Bu bağlamda şu kodlarda nasıl bir revize yapmak gerekir.
teşekkürler ,
Dim nvE As Object
Private Sub Emre_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
nvE.Visible = False
ActiveCell.Offset(1, 0).Select
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Set nvE = ActiveSheet.OLEObjects("Emre")
On Error GoTo 0
If nvE Is Nothing Then
With ActiveSheet.OLEObjects.Add(ClassType:="Forms.ComboBox.1", _
Width:=Target.Width, _
Height:=Target.Height)
.Name = "Emre"
End With
Set nvE = ActiveSheet.OLEObjects("Emre")
End If
Set Target = Intersect(Target, Range("B:B"))
If Target Is Nothing Then
nvE.Visible = False
nvE.LinkedCell = ""
Exit Sub
ElseIf Target.Count > 1 Or Target.Row = 1 Then
nvE.Visible = False
nvE.LinkedCell = ""
Exit Sub
End If
With nvE
Application.ScreenUpdating = False
.Top = Target.Top
.Left = Target.Left
.ListFillRange = "veri"
.LinkedCell = Target.Address
.Enabled = True
.Visible = True
.Activate
End With
End Sub
Hücreye tıkladığımda Combo box açılıyor ve girdiğim karakterleri yalnızca ilk harf olarak sorgulama değil de kalimenin ya da cümlenin tamamında sorgulamasını istiyorum.
Bu bağlamda şu kodlarda nasıl bir revize yapmak gerekir.
teşekkürler ,
Dim nvE As Object
Private Sub Emre_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
nvE.Visible = False
ActiveCell.Offset(1, 0).Select
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Set nvE = ActiveSheet.OLEObjects("Emre")
On Error GoTo 0
If nvE Is Nothing Then
With ActiveSheet.OLEObjects.Add(ClassType:="Forms.ComboBox.1", _
Width:=Target.Width, _
Height:=Target.Height)
.Name = "Emre"
End With
Set nvE = ActiveSheet.OLEObjects("Emre")
End If
Set Target = Intersect(Target, Range("B:B"))
If Target Is Nothing Then
nvE.Visible = False
nvE.LinkedCell = ""
Exit Sub
ElseIf Target.Count > 1 Or Target.Row = 1 Then
nvE.Visible = False
nvE.LinkedCell = ""
Exit Sub
End If
With nvE
Application.ScreenUpdating = False
.Top = Target.Top
.Left = Target.Left
.ListFillRange = "veri"
.LinkedCell = Target.Address
.Enabled = True
.Visible = True
.Activate
End With
End Sub
Ekli dosyalar
Son düzenleme:
