You should load your Userform Like This:
Private Sub UserForm_Initialize()
Myarray = Range("A6:D8").Value
Myarray2 = Range("C1:C3").Value
For Count = 1 To 3
Me.Controls("Textbox" & Count).Value = Myarray(Count, 4)
Me.Controls("Label" & Count).Caption = Myarray(Count, 1)
Me.Controls("Label" & Count + 10).Caption = Myarray2(Count, 1)
Next
End Sub
Saving It Should be the reverse more or less. Bear with me.
You will Need a command button on the userform.
Private Sub CommandButton1_Click()
For Count = 1 To 3
MyArray(Count, 4) = Me.Controls("Textbox" & Count).Value + Me.Controls("Textbox" & Count + 3).Value - Me.Controls("Textbox" & Count + 6).Value
Me.Controls("Textbox" & Count + 3).Value = ""
Me.Controls("Textbox" & Count + 6).Value = ""
Next
Range("A6:D8").Value = MyArray
End Sub
This may seem like a round about method but it is fast because there is only Three read / write operations to excel involved.
Bookmarks