Private Sub UserForm_Activate()
r = ActiveCell.Row
With ActiveSheet
S = .Name
If S = "sale" Then
TextBox7 = Sheets("sale").Cells(r, 2)
End If
If S = "main" Then
TextBox7 = Sheets("main").Cells(r, 1)
End If
End With
End Sub
لا ينفذ الأمر إلا في الورقة sale
ممكن المساعدة