Three choices:
1. Declare an object variable of the type required.
2. Declare a generic object variable of the type "Object"
3. Declare a variant type variable.

Here's samples of how to do it:
Private Sub Command3_Click()
Dim oT As TextBox

Set oT = Text1
oT.Text = "TextBox"
End Sub

Private Sub Command1_Click()
Dim o As Object

Set o = Text1
o.Text = "Object"
End Sub

Private Sub Command2_Click()
Dim v As Variant

Set v = Text1
v.Text = "Variant"

End Sub

You can also pass the object to a Sub or Function:

Private Sub PassTextBox( oT as TextBox)
End Sub

Private Sub Command4_Click()
PassTextBox Text1
End Sub

Please note that while I'm using a Textbox control as an object to pass
around inside the project, you can't pass the same to an Active X DLL (I
assume but haven't tried the same in a control). This is because VB wraps
controls inside its own extender library. You get a Type Mismatch Error (13)
if you try to.


Snip wrote in message <38c8cf84$>...
>I need to be able to pass the name of an object into a variable and the use
>the variable to alter that objects properties...
>Variable1 = ActMod1.Name
>Variable1.value = 15
>variable1.ID = 0012
>Does anyone know how to do this???