First, you should create a Combo1 combobox control as the final implementation tool for the Drop-down box.
Private Sub Combo1_click ()
Msflexgrid1.row = Msflexgrid1.rowsel
Msflexgrid1.col = 2
Msflexgrid1.text = Combo1.text
End Sub
' Private Sub combo1_lostfocus ()
' Combo1.text = Msflexgrid1.text
' End Sub
Private Sub Form_Load ()
Combo1.visible = False
Combo1.additem "AAA"
Combo1.additem "BBB"
Combo1.additem "CCC"
Msflexgrid1.cols = 10
Msflexgrid1.rows = 10
End Sub
Private Sub Msflexgrid1_entercell ()
If Msflexgrid1.col = 2 Then
Msflexgrid1.cellbackcolor = Vbwhite
Msflexgrid1.cellforecolor = Vbblue
Combo1.move Msflexgrid1.left + msflexgrid1.cellleft, Msflexgrid1.top + msflexgrid1.celltop, MSFlexGrid1.CellWidth
Combo1.visible = True
' Combo1.text = Msflexgrid1.text
Else
Exit Sub
End If
' Combo1.selstart = 0
' Combo1.sellength = Len (Combo1.text)
End Sub
Private Sub Msflexgrid1_leavecell ()
' If Msflexgrid1.col = 2 Then
Msflexgrid1.cellbackcolor = Vbwhite
Msflexgrid1.cellforecolor = Vbblue
' Combo1.move Msflexgrid1.left + msflexgrid1.cellleft, Msflexgrid1.top + msflexgrid1.celltop, MSFlexGrid1.CellWidth
' Msflexgrid1.text = Combo1.text
' Else
' Exit Sub
' End If
End Sub
' Private Sub combo1_change ()
' Msflexgrid1.row = Msflexgrid1.rowsel
' Msflexgrid1.col = 2
' Msflexgrid1.text = Combo1.text
' End Sub
Private Sub Timer1_timer ()
timer1.enabled = True
Combo1.visible = False
End Sub