Create Userform from Worksheet
I tried this with out errors
Sub BuildMyForm()
Dim txtbx1 As msforms.TextBox
Set txtbx = UserForm1.Controls.Add("Forms.textbox.1")
With txtbx
.Name = "nOK"
.Value = Worksheets("Sheet1").Range("d3").Value
.BackColor = &H8000000D
.Font.Size = 8
End With
UserForm1.Show
End Sub
Now I just have to go back and figure out the selection loop to set
the textbox values
|