|
'general declaration area
Dim strDBGridCell As String Private Sub DBGrid1_AfterColEdit(ByVal ColIndex As Integer) DBGrid1.Columns(ColIndex) = strDBGridCell End Sub Private Sub DBGrid1_BeforeColEdit(ByVal ColIndex As Integer, ByVal KeyAscii As Integer, Cancel As Integer) strDBGridCell = InputBox("Edit DBGrid Cell:", , DBGrid1.Columns(ColIndex)) End Sub 'Now whenever you attempt to edit any cell in the DBGrid, 'you'll see the InputBox prompt you for input. 'You can replace the InputBox with any other 'custom dialog you wish to build. |