Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer) If DataGrid1.Col = 1 Then Combo1.Width = DataGrid1.Columns(DataGrid1.Col).Width Combo1.Left = DataGrid1.Left + DataGrid1.Columns(DataGrid1.Row).Left Combo1.Top = DataGrid1.Top + DataGrid1.Row * DataGrid1.RowHeight + 255 Else Combo1.Visible = False End If End Sub
Check1.Width = 180
Check1.Height = 180
DataGrid1.Row = 1
DataGrid1.Col = 2
Check1.Left = DataGrid1.Columns(2).Left + DataGrid1.Columns(2).Width - Check1.Width
Check1.Top = DataGrid1.Columns(2).Top + DataGrid1.RowHeight - Check1.Height
http://soft.winzheng.com/SoftView/SoftView_13387.htm
FlexCell是一款美观、方便、易用的电子表格控件,最新版本支持图表功能,不需要Excel运行库支持就可以输出为ExcelWorkBook。提供了文本框、组合下拉框、复选框、日历、按钮、超链接等6种单元格类型,以及Cell、Chart、Column、ComboBox、Range、Selection、PageSetup等6个编程对象,支持剪贴板操作、设置单元格属性、合并单元格、打印和打印预览等功能。使用本控件,可以方便地制作出非常专业的报表和数据输入界面。
装好后有vb的详细示例
If DataGrid1.Col = 1 Then
Combo1.Width = DataGrid1.Columns(DataGrid1.Col).Width
Combo1.Left = DataGrid1.Left + DataGrid1.Columns(DataGrid1.Row).Left
Combo1.Top = DataGrid1.Top + DataGrid1.Row * DataGrid1.RowHeight + 255
Else
Combo1.Visible = False
End If
End Sub