dim a as checkbox
dim b as string

b= "check1"


this code give me error.

is ther any fuction to convert string into an object ? like cstr().
or what is the procedure to convert a string into an object ?
plz help me.

i need help

I think u r trying to create a checkbox on runtime and give it the name stored in variable b. if so below is the code to do it:

Private Sub Command1_Click()

    Dim a As CheckBox
    Dim b As String
    b = "check1"
    Set a = Controls.Add("VB.CheckBox", b)
    With a
        .Visible = True
        .Caption = b
        .Top = 50
        .Left = 50
    End With

End Sub