View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
caveman.savant caveman.savant is offline
external usenet poster
 
Posts: 31
Default 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