hi experts
need from somebody provide me hand of help
the code works so well when write th digits or letters in textbox2,3,4 . it populate in textbox1 , but I added multiple textboxes , then I have to rename the function and change the number in textbox which populate the value in CODE . as you see when populate in textbox5,9 I have to rename function (toFill,toFill1,toFill2) to implement for textbox5,9 . then userform becomes contains many codes . so I search way to make short the code by using array or loop .
actually I try like this
Sub toFill(a As String, b As String, c As String)
Dim n As String, arr As Variant
rr = Array(TextBox1, TextBox5, TextBox9)
a1 = Split(a)(0)
For i = 1 To Len(a)
If Mid(a, i, 1) Like "#" Then n = n & Mid(a, i, 1)
Next
c = Left(c, 1)
rr = a1 & c & b & n
End Sub
but this does not succeed
thanks