با سلام
فایل پیوست را ملاحظه بفرمایید
کد PHP:
Private Sub CommandButton1_Click()
Z = Sheet1.Cells(Sheet1.Rows.Count, "A").End(xlUp).Row
If Z = 3 Then
Z = 4
Else
Z = Z + 1
End If
Range("A" & Z).Select
ActiveCell.FormulaR1C1 = Z
Range("A" & Z).Formula = "=max($A$3:A" & Z - 1 & ")+1"
Range("c" & Z).Value = TextBox1.Value
Range("d" & Z).Value = TextBox2.Value
Range("e" & Z).Value = TextBox3.Value
Range("f" & Z).Value = TextBox4.Value
Range("h" & Z).Value = TextBox5.Value
Range("i" & Z).Value = TextBox6.Value
Range("j" & Z).Value = TextBox7.Value
Range("k" & Z).Value = TextBox8.Value
End Sub
علاقه مندی ها (Bookmarks)