WillyKelleher
Programmer
I placed a datagrid control on an excel sheet and set the width and then through vba I load a recordset into it.
I am having problems with it, after I close and reopen the workbook the grid loads in the sheet activate code but only the top left inch or so is selectable and the rest apears but not realy. It is almost like the grid has resized itself but left behind the orginal screen with the grid contents
If I delete the grid and add it back then move off sheet and back on the grid is perfect.
or if I keep making the grid just a little bigger in the vba worksheet activate function I can get the grid back under controll
Also to keep the grids size I have to resize it after
loading the recordset or it will size down to that inch mentioned above. I have tried everything.
Private Sub Worksheet_Activate()
LoadDg
End Sub
Public Function LoadDg()
'Set Me.DataGrid1.DataSource = Nothing
Set Me.DataGrid1.DataSource = rsSpeed
Me.DataGrid1.width = 602
'Me.DataGrid1.Refresh
Me.DataGrid1.width = 600
Me.DataGrid1.Refresh
end function
Any help would be apreciated
Thanks
I am having problems with it, after I close and reopen the workbook the grid loads in the sheet activate code but only the top left inch or so is selectable and the rest apears but not realy. It is almost like the grid has resized itself but left behind the orginal screen with the grid contents
If I delete the grid and add it back then move off sheet and back on the grid is perfect.
or if I keep making the grid just a little bigger in the vba worksheet activate function I can get the grid back under controll
Also to keep the grids size I have to resize it after
loading the recordset or it will size down to that inch mentioned above. I have tried everything.
Private Sub Worksheet_Activate()
LoadDg
End Sub
Public Function LoadDg()
'Set Me.DataGrid1.DataSource = Nothing
Set Me.DataGrid1.DataSource = rsSpeed
Me.DataGrid1.width = 602
'Me.DataGrid1.Refresh
Me.DataGrid1.width = 600
Me.DataGrid1.Refresh
end function
Any help would be apreciated
Thanks