Soru Textbox içeriğini seçtirmek

Mahmut Bayram

Özel Üye
Katılım
25 Haziran 2005
Mesajlar
1,778
Excel Vers. ve Dili
2021 Excel Tr
Kod:
Private Sub CommandButton1_Click()
    With TextBox3
        .SetFocus
        .SelStart = 0
        .SelLength = Len(.Text)
    End With
End Sub
 
Katılım
7 Ağustos 2019
Mesajlar
106
Excel Vers. ve Dili
İngilizce
Kod:
Private Sub CommandButton1_Click()
    With TextBox3
        .SetFocus
        .SelStart = 0
        .SelLength = Len(.Text)
    End With
End Sub
merhaba hocam çalışmadı malesef


Kod:
Private Sub TextBox3_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim k As Range, sat As Integer
If UserForm1.TextBox3.Value = "" Then
TextBox13 = ""
TextBox23 = ""
TextBox33 = ""
Else
sat = Workbooks("parekende satış.xlsm").Sheets("Stok").Cells(Rows.Count, "b").End(xlUp).Row
Set k = Workbooks("parekende satış.xlsm").Sheets("Stok").Range("b2:b" & sat).Find(UserForm1.TextBox3.Value, , xlValues, xlWhole)
If k Is Nothing Then
MsgBox "Girdiğiniz stok kodu yanlıştır lütfen kontrol ediniz", vbInformation
With TextBox3
        .SetFocus
        .SelStart = 0
        .SelLength = Len(.Text)
    End With
Else
Me.TextBox13.Text = k.Offset(0, 1)
Me.TextBox23.Text = k.Offset(0, 6)
Me.TextBox33.Text = k.Offset(0, 4)

End If
End If
End Sub
düzenlemeniz mümkün mü?
 
Katılım
7 Ağustos 2019
Mesajlar
106
Excel Vers. ve Dili
İngilizce
örnek dosya yükledim istediğim şey eğer stok kodyu yanlış girilirse diğer textboxları görünür yapmasın ve imleç yanlış girilen textboxta olsun
 
Üst