With Me.dgvOffices 'DataGridView
Dim loadArray(,) As Object
Dim k As Integer = 1 'Counter below
loadArray = wbHomeWorkbook.Sheets("Maint").Range("F3:P9").value
For i As Integer = 0 To 10 '6 to 16, Col 0 is first in Array for actual Col. 6
For j As Integer = 0 To LastRowNum - 3 ' 3 To LastRowNum
If i = 0 Then 'First Col 6 needs new Row.
dgvOffices.Rows.Add(0 + k)
k = k + 1
dgvOffices.Rows(j).Cells(i).Value = loadArray(j + 1, i + 1)
Open in new window
That data feeds the dynamic LoadArray.
IT issues often require a personalized solution. With Ask the Experts™, submit your questions to our certified professionals and receive unlimited, customized solutions that work for you.