jadams0173
Technical User
- Feb 18, 2005
- 1,210
I've done this before but for some reason it's not working now. I have a MSFLEXGRID and I want to hid the last column so I did this:
However the column is still the width of it's heading in the fixed column. If I change the width from 0 to 2000 the column gets wider, but it will not hide completely. I'm pulling my hair out. Does anyone have any suggestions.
Here is part of the function that is located in a class module. The part I left out is just the loading of the data. If it is relevent I'll post it as well.
Code:
TheGrid.ColWidth(18) = 0 'id
However the column is still the width of it's heading in the fixed column. If I change the width from 0 to 2000 the column gets wider, but it will not hide completely. I'm pulling my hair out. Does anyone have any suggestions.
Here is part of the function that is located in a class module. The part I left out is just the loading of the data. If it is relevent I'll post it as well.
Code:
Function PopulateEngWildcardFlexGrid(frm As Form, rsEngWildcard As ADODB.Recordset, _
TheGrid As MSFlexGrid)
Dim x As Integer
Dim i As Integer
Dim c As Integer
'Populate the flexgrid
frm.Show
TheGrid.Enabled = True
TheGrid.Clear
TheGrid.cols = 19
TheGrid.rows = rsEngWildcard.RecordCount + 1
TheGrid.FixedRows = 1
TheGrid.FixedCols = 0
TheGrid.Row = 0
TheGrid.FormatString = "Customer|^Location|<Assy Number|<Tool Number|<Rev|<Job Number|" _
& "^Date Entered|Disposition|Transfer To|Used|<Comments|<Raw Card PN|^Tool Size|" _
& "Updated On|Updated By|Dispositioned As|Disp By|Disp Date|id"
TheGrid.ColWidth(0) = 1300
TheGrid.ColWidth(1) = 1500
TheGrid.ColWidth(2) = 2000
TheGrid.ColWidth(3) = 2000
TheGrid.ColWidth(4) = 550
TheGrid.ColWidth(5) = 1000
TheGrid.ColWidth(6) = 2300
TheGrid.ColWidth(7) = 1100
TheGrid.ColWidth(8) = 1000
TheGrid.ColWidth(9) = 550
TheGrid.ColWidth(10) = 2500
TheGrid.ColWidth(11) = 2000
TheGrid.ColWidth(12) = 750
TheGrid.ColWidth(13) = 1000
TheGrid.ColWidth(14) = 750
TheGrid.ColWidth(15) = 900
TheGrid.ColWidth(16) = 1000
TheGrid.ColWidth(17) = 1000
[red]TheGrid.ColWidth(18) = 0 'id[/red]
[blue]'TheGrid.ColWidth(TheGrid.cols - 1) = 0[/blue]