View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Sandy Sandy is offline
external usenet poster
 
Posts: 355
Default Controls Question

Thank you.


Yes, the 1st line works ok.

The name of the control that I want to set the row source for is already
stored in the memory variable called YVariable ("FormName.XControl").

After that I don't know how to refer to the control via the contents of
Yvariable.

"Dave Peterson" wrote:

The first line worked ok?
FormName.xControl.RowSource = ListName

Then did you do something like:

Set yVariable = FormName.xControl
yvariable.rowsource = listname

If it didn't work, you may want to share more of your code.

Sandy wrote:

I have the name of a control ("FormName.XControl") stored in a memory
variable (YVariable) I want to set the row source of xControl by referring to
the variable YVariable.

Instead of FormName.xControl.RowSource = ListName I want
YVariable.rowsource = ListName

How do I accomplish this?

Thank you


--

Dave Peterson