السلام عليكم
أقصد إذا كانت الورقة (1) تكست بوكس1= كذا
إذا كانت الورقة (2) تكست بوكس1= كذا
Private Sub UserForm_Activate()
With Sheets("BUY")
LL = ActiveCell.Rows.Row
TextBox1.Value = Sheets("BUY").Cells(LL, "L")
TextBox2.Value = Sheets("BUY").Cells(LL, "T")
TextBox3.Value = Sheets("BUY").Cells(LL, "U")
TextBox4 = ""
TextBox5.Value = Sheets("BUY").Cells(LL, "S")
TextBox6 = ""
ComboBox1.Value = Sheets("BUY").Cells(LL, "F").Address
End With
With Sheets("MAIN")
NN = ActiveCell.Row
TextBox1.Value = Sheets("MAIN").Cells(NN, "P")
TextBox2.Value = Sheets("MAIN").Cells(NN, "S")
TextBox3.Value = Sheets("MAIN").Cells(NN, "T")
TextBox4 = ""
TextBox5.Value = Sheets("MAIN").Cells(NN, "V")
TextBox6 = ""
ComboBox1.Value = Sheets("MAIN").Cells(NN, "B").Address
End With
End Sub