Re-positioning the buttons was just so clever. Why make things complicated? Thanks a lot!
The problem with transfering data from the text boxes still remain though.
When adding textboxes in design-mode I can refer to them in a way like this:
Activesheet.Range("H34")=Employees1.value
Since the text boxes are created at userform-initiation (Employees1...Employeesn), I can not refer to them when clicking the Save-button,
In the userform initiation I have this code:
For i = StartRow To StartRow + NoCompanies - 1
If Worksheets("Start").Cells(i, 8) = "" Then
Number = "n/a"
Else
Number = Worksheets("Start").Cells(i, 7)
End If
Set tNumber = FormIndata.Controls.Add("Forms.TextBox.1")
With tNumber
.Value = Number
.Width = 50
.Top = j - 3
.Left = 150
.Height = 17
.TextAlign = fmTextAlignRight
.Name = "Employees" & i - StartRow + 1
End With
j = j + 20
Next i
Any thoughts on how to refer to the textboxes?
/Fred
Bookmarks