I wana put name of the product (cell j2) in label3 on userform. I wana triger that action after i press enter in textbox1. How do i do that?
Here is the code.
Private Sub CommandButton1_Click()
Sheets("TABLICA").Select
Dim sifra As Integer
Dim kolicina As Double
sifra = TextBox1.Value
kolicina = TextBox2.Value
Worksheets("TABLICA").Cells(2, "E").Value = sifra
Worksheets("TABLICA").Cells(2, "K").Value = kolicina
Range("A1:C131").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
"TABLICA!Criteria"), CopyToRange:=Range("TABLICA!Sifnaz"), Unique:=False
Range("I2:K2").Select
Selection.Copy
Sheets("GALETA1").Select
NextRow = Range("A65536").End(xlUp).Row + 1
Range("A" & NextRow).Select
ActiveSheet.Paste
Sheets("TABLICA").Select
Application.CutCopyMode = False
'Range("I2:K2").ClearContents
Sheets("GALETA1").Select
TextBox1.Text = ""
TextBox2.Text = ""
TextBox1.SetFocus
End Sub
Bookmarks