Código:
El messagebox me devuelve el valor correcto, pero cuando toca a seleccionar essa misma línea me devuelve un error:Dim lastRow As Integer = DGV.RowCount MsgBox(lastRow) DGV.Rows(lastRow).Selected = True
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Pero si le asigno yo un valor, por ejemplo:
Código:
La selecciona sin cualquier problema. DGV.Rows(5).Selected = True