Kod açma.

Katılım
8 Eylül 2005
Mesajlar
476
Excel Vers. ve Dili
Excel 2003 - Türkçe
USERFORM'a
Textbox1 Ürün Kodu
TextBox2 Ürün Adı
girilince Stok sayfasında aynı kodun olup olmadığına baksın sonra son satırına işlesin.


Teşekkürler...
 

Orion1

Uzman
Uzman
Katılım
1 Mart 2005
Mesajlar
22,254
Excel Vers. ve Dili
Win7 Home Basic TR 64 Bit

Ofis-2010-TR 32 Bit
Sayın Galus ekli dosyayı inceleyiniz.:cool:
Kod:
Private Sub CommandButton1_Click()
Dim k As Range
Sheets("STOK").Select
If TextBox1.Value = "" Then
    MsgBox "Bir kod girmelisiniz.!", vbCritical
    TextBox1.SetFocus
    Exit Sub
End If
If TextBox2.Value = "" Then
    MsgBox "Bir Ürün ismi girmelisiniz.!", vbCritical
    TextBox2.SetFocus
    Exit Sub
End If
sat = Cells(65536, "A").End(xlUp).Row + 1
Set k = Range("A2:A65536").Find(TextBox1.Value, , xlValues, xlWhole)
If k Is Nothing Then
    Cells(sat, "A").Value = TextBox1.Value
    Cells(sat, "B").Value = TextBox2.Value
    MsgBox "Kayıt Girildi..", vbOKOnly + vbInformation, "KAYIT"
    TextBox1.Value = Empty: TextBox2.Value = Empty: TextBox1.SetFocus
    Else
    MsgBox "Bu Kod var." & vbLf & "Kayıt Yapılmadı..!!", vbCritical
    TextBox1.SetFocus
End If
End Sub
 
Katılım
8 Eylül 2005
Mesajlar
476
Excel Vers. ve Dili
Excel 2003 - Türkçe
Sayın Orion2,

Çok teşekkürler. Allah (CC) razı olsun.

Saygılar...
 
Üst