هل استخدمت تعريف المتغير ؟؟؟؟؟؟؟؟؟؟؟؟؟؟
Dim Myco(1 To 7)
في اول صف لموديل الفورم
===============================
مثل ما استخدمته انا في ملفي
Dim Myco(1 To 7)
Private Sub CommandButton1_Click()
Dim R As Integer, ENDROW As Integer
With ورقة2
ENDROW = .Range("C" & .Rows.Count).End(xlUp).Row + 1
For R = 1 To 7
.Cells(ENDROW, R + 2).Value = Me.Controls(Myco(R)).Value
Next R
End With
MsgBox "تم الترحيل"
End Sub
Private Sub CommandButton2_Click()
End
End Sub
Private Sub UserForm_Activate()
For R = 1 To 7
Myco(R) = "Kh_" & R
Next
End Sub