So the following code grabs the header row and populates each field in a combobox.
I then want to select a field name from the combobox and go to that column in the datagridview, is that possible?
Dim c As Integer
For cn = 0 To DataGridView1.Columns.Count - 1
c = c + cn
'Debug.Print(cn)
'Debug.Print(DataGridView1.Columns(cn).Name)
ComboBox1.Items.Add(DataGridView1.Columns(cn).Name)
Next cn
You'd want to check that the DGV has data and perhaps that there is a
CurrentRow
: