نوشته اصلی توسط
mohammad59
سپاسگزارم
ولی موردی که هست بعداز فراخوانی وقتی ویرایش می کنی تو ردیف جدید ثبت میکنه که بابد تو همون ردیف ویرایش رو انجام بده
فایل پیوست را بررسی بفرمایید.
کد PHP:
Public x As Integer
کد PHP:
If x = 0 Then
Cells(emptyRow, 1).Value = TextBox1.Value
Cells(emptyRow, 2).Value = TextBox2.Value
Cells(emptyRow, 3).Value = TextBox3.Value
Cells(emptyRow, 4).Value = TextBox4.Value
If Len(ComboBox2) = 1 And Len(ComboBox3) = 1 Then
Cells(emptyRow, 5).Value = "0" & ComboBox3.Value & "/" & "0" & ComboBox2.Value & "/" & ComboBox1.Value
ElseIf Len(ComboBox2) = 1 Then
Cells(emptyRow, 5).Value = ComboBox3.Value & "/" & "0" & ComboBox2.Value & "/" & ComboBox1.Value
ElseIf Len(ComboBox3) = 1 Then
Cells(emptyRow, 5).Value = "0" & ComboBox3.Value & "/" & ComboBox2.Value & "/" & ComboBox1.Value
End If
If OptionButton1.Value = True Then
Cells(emptyRow, 6).Value = "ÔÚÈ"
Else
Cells(emptyRow, 6).Value = "ÏÝÊÑí"
End If
Else
Cells(x, 1).Value = TextBox1.Value
Cells(x, 2).Value = TextBox2.Value
Cells(x, 3).Value = TextBox3.Value
Cells(x, 4).Value = TextBox4.Value
If Len(ComboBox2) = 1 And Len(ComboBox3) = 1 Then
Cells(x, 5).Value = "0" & ComboBox3.Value & "/" & "0" & ComboBox2.Value & "/" & ComboBox1.Value
ElseIf Len(ComboBox2) = 1 Then
Cells(x, 5).Value = ComboBox3.Value & "/" & "0" & ComboBox2.Value & "/" & ComboBox1.Value
ElseIf Len(ComboBox3) = 1 Then
Cells(x, 5).Value = "0" & ComboBox3.Value & "/" & ComboBox2.Value & "/" & ComboBox1.Value
End If
If OptionButton1.Value = True Then
Cells(x, 6).Value = "ÔÚÈ"
Else
Cells(x, 6).Value = "ÏÝÊÑí"
End If
End If
End Sub
علاقه مندی ها (Bookmarks)