View Single Post
  #1   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

I want to attach a name to a userform (i.e. userform1,2,3 etc) or a control
within a form (i.e. TextBox1,2,3 etc) by means of a loop. How do I name the
userform/control with a variable such as a string ...

Dim UF as UserForm
Dim str as string
Dim j as Integer

For j = 1 to 5
str = ³UserForm² & j
UF.Name = str
UF.Show
Next j

- It doesnıt work, but is it close?

Thanks for any help.