Many thanks for your help - it is now working a treat.
In the end I added this into the main code of the previous forms
button:
For i = 0 To UserForms.Count - 1
If UserForms.Item(i).Name = FormName Then
PopulateHeadingsByName (i)
End If
Next i
In the Open Workbook event I have loaded all forms then hidden all but
one, so this finds the index of the form I want to show and passes that
to my other subroutine.
By then using
UserForms.Item(Index).Controls(textboxname).value = reuiqred value
they all get popoulated and shown.
Works brilliantly.
Thanks for all your help.
Regards,
Adam
--
Adamaths
------------------------------------------------------------------------
Adamaths's Profile:
http://www.excelforum.com/member.php...o&userid=31580
View this thread:
http://www.excelforum.com/showthread...hreadid=512806