View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default userform and variable

bob:

i was looking to use a variable to create the userform name. so instead of with
userform1, with userform2, i could use:
with userform(i)
..
..
end with
or
uform = userform1
then use the variable to manipulate the form ( i know this won't work, but)
with uform
..
..
end with

i've used me.controls("textbox" & i) and am wondering if there is a way to do
this with the form itself.

Gary


"Bob Phillips" wrote in message
...
Is this the sort of thing you had in mind


Dim oUserForm As Object
On Error GoTo err
Set oUserForm = UserForms.Add("Userform1")
'...

With oUserform
.Show


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
"John Bundy" wrote in message
...
Don't think so, what are you trying to accomplish? Actually i'm not even sure
of the question, are you just wanting to change the name of the userform? or
set the name to a variable?

"Gary Keramidas" wrote:

anyway to set a userform name to a variable i can use with <variable name
instead of with userform1, with userform2, etc?

--


Gary