Hi everyone, new to the forums here and I needed some hekp with a program I'm working on. Basically, I have a datagridview and I want to use values inputed into it to control the position and width of pictureboxes. When I use my code I get an index out of range error for any row other than the first one. When I have only the code for the first row it works, when I add more it doesnt.

Heres the code so far:

under form load:

DataGridView.Rows.Add(28)

under datagridview value changed event:

picBar1.Width = DataGridView.Item(3, 0).Value * 27
picBar1.Location = New Point(picCalendar31.Location.X + DataGridView.Item(2, 0).Value * 27 , picBar1.Location.Y)

picBar2.Width = DataGridView.Item(3, 1).Value * 27
picBar2.Location = New Point(picCalendar31.Location.X + DataGridView.Item(2, 1).Value * 27 , picBar2.Location.Y)

Any help is appreciated, thanks