You could do it like that, but I think it would get unwieldy - I'd use a listbox with add and update buttons
Option Explicit
Dim EditingIndex As Long
Private Sub Add_Click()
Dim data
Me.ListBox1.AddItem
MsgBox Me.ListBox1.ListCount
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 0) = we1.Value
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 1) = we2.Value
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 2) = we3.Value
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 3) = we4.Value
'if first group (work experience 1) of textboxes are blank then
'Do Nothing else
' import below first group second group (work experience 2)...
End Sub
Private Sub Edit_Click()
EditingIndex = Me.ListBox1.ListIndex
MsgBox EditingIndex
Me.ListBox1.List(EditingIndex, 0) = Me.we1.Value
Me.ListBox1.List(EditingIndex, 1) = Me.we2.Value
Me.ListBox1.List(EditingIndex, 2) = Me.we3.Value
Me.ListBox1.List(EditingIndex, 3) = Me.we4.Value
End Sub
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
EditingIndex = Me.ListBox1.ListIndex
Me.we1.Value = Me.ListBox1.List(EditingIndex, 0)
Me.we2.Value = Me.ListBox1.List(EditingIndex, 1)
Me.we3.Value = Me.ListBox1.List(EditingIndex, 2)
Me.we4.Value = Me.ListBox1.List(EditingIndex, 3)
End Sub
Bookmarks