Hey Guys thanks for taking the time to read this. I am creating a program and at one point it requires the user to create labels etc then it saves there positions to a file. It then reloads them at start-up. This all works perfectly.
I am storing my labels in a array of 50. That also works fine, however my problem arises when I want to an a handle to it. I want to add a when clicked event. However when i try the code:
It doesn't like me using brackets in the AddressOf. If anyone can help out i will be very greatful.

I am storing my labels in a array of 50. That also works fine, however my problem arises when I want to an a handle to it. I want to add a when clicked event. However when i try the code:
VB.NET:
Me.Controls.Add(Label(I))
AddHandler Label(I).Click, AddressOf Label(I)_Click
It doesn't like me using brackets in the AddressOf. If anyone can help out i will be very greatful.