Hi,
I am getting an error: "Subscript out of range" and highlights the following line:
VB Code:
dbgAutomobiles.Columns(i).Width = 0
I have 47 fields in total.
The following is the code:
VB Code:
Private Sub Datagridcolumns() Dim i As Integer dbgAutomobiles.Columns(0).Width = 0 dbgAutomobiles.Columns(1).Width = 3025 dbgAutomobiles.Columns(2).Width = 1000 dbgAutomobiles.Columns(3).Width = 900 For i = 4 To dbgAutomobiles.Columns.Count dbgAutomobiles.Columns(i).Width = 0 Next End Sub
Regards.
Seema_s




Reply With Quote