|
On a form I have put a text box , 2 command buttons and 2 labels.
On running the code below, label2 will correctly show the contents of Text1 after clicking on command1, but on clicking on command2 the error Report
‘an error was encountered when running this program object is not a collection’ is shown
Private Sub Command1_Click()
Dim ml
ml=Cstr(text1)
Label2 = ml
End Sub
Private Sub Command2_Click()
Dim mls
ml=Cstr(text1)
Label3 = Left(ml,3)
End Sub
|