Hi guys, can you please help me out.
I have 14 panels in my form, the user then input a number in the textbox. Then this textbox will now determine how many panels will be enable. My formula would be, userinputtextbox/0.5=panels to be open. Example: 3/0.5=6.
So far this is my code:
for x = 1 to UserInputTextbox.text CType(Me.Controls("P" & x.ToString ), Panel).Enabled = True next
But I got this error:
Object reference not set to an instance of an object.
And it highlighted my Ctype code. What I am lacking?
PS. The names of my panels were P1, P2.... P14 =)