Hello,
I'm new to visual basic, working on a school project.

I'm stuck with this part of my program:

Private Sub tramite_Change()
Dim ctrl, ctrlnum

numero_de_control.SetFocus
ctrl = numero_de_control.Value
ctrlnum = Left(ctrl, 3)
MsgBox (ctrlnum)

Text24.SetFocus
Text24.Text = Now()
End Sub

OK,

ctrlnum = Left(ctrl, 3)
Does not work, it returns "Compile error: Can't find project or library"

If I do this:

Left(ctrl, 3) = ctrlnum

It works but of course the ctrl string is modified with the value of ctrlnum, and what I need if to store the result of Left() function on ctrlnum.

Please help...