View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Brad Patterson Brad Patterson is offline
external usenet poster
 
Posts: 16
Default Assigning the name of a userform/control to a changing string

Thanks leo, but I wanted to name the item iteratively * when they already
exist.

It¹s just trying to refer to the textbox with a string that had me stumped,
but I know the answer thanks to your post and the Me.Control(²textbox
....²).value command.

Thanks!


in article , Leo Heuser at
wrote on 16/7/03 6:37 PM:

Private Sub UserForm_Initialize()
Dim Counter As Long

For Counter = 1 To 3
Me.Controls.Add "forms.checkbox.1", Name:="Burger" & Counter
Next Counter

Me.Controls("Burger2").Value = True ' or Me!burger2.Value = True

MsgBox Me!burger2.Value
End Sub