1,451
社区成员
发帖
与我相关
我的任务
分享
Dim intRow As Integer
Dim intCol As Integer
Private Sub Combo1_Click()
Combo1.Visible = False
DataGrid1.Row = intRow
DataGrid1.Col = intCol
DataGrid1.Text = Combo1.Text
End Sub
Private Sub DataGrid1_ButtonClick(ByVal ColIndex As Integer)
With DataGrid1
intRow = .Row
intCol = ColIndex
Combo1.Left = .Left + .Columns(ColIndex).Left
Combo1.Top = .Top + .RowHeight * (.Row + 1)
Combo1.Width = .Columns(ColIndex).Width
Combo1.Visible = True
End With
End Sub
Private Sub Form_Load()
Dim i As Integer
For i = 1 To 10
Combo1.AddItem i
Next i
Combo1.Visible = False
End Sub
Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
List1.Visible = False
End Sub
Private Sub list1_Click()
List1.Visible = False
DataGrid1.Text = List1.Text
End Sub
Private Sub DataGrid1_ButtonClick(ByVal ColIndex As Integer)
With DataGrid1
List1.Left = .Left + .Columns(ColIndex).Left
List1.Top = .Top + .RowHeight * (.Row + 2)
List1.Width = .Columns(ColIndex).Width
List1.Visible = True
End With
End Sub
Private Sub Form_Load()
With List1
.Appearance = 0
.Height = 450
.AddItem "真"
.AddItem "假"
.Visible = False
End With
End Sub