group box problem

Excuse me, How I assign the value of a variable to a Groubox #?
If I have a varibale Y (is an Integer value) and I write: GroupBox#.Caption = Y, the program inform Error.