Now clear.
You can see the source code of the sample if you open the form module (Form1.frm) like a text file in any editor like Notepad. In fact, all the main work is done in the RequestEdit event of the grid. You simply prohibit the built in editing and place your custom control over the current cell:
Private Sub iGrid1_RequestEdit(ByVal lRow As Long, ByVal lCol As Long, ByVal iKeyAscii As Integer, bCancel As Boolean, sText As String, lMaxLength As Long, eTextEditOpt As iGrid300_10Tec.ETextEditFlags)
Dim lLeft As Long, lTop As Long, lWidth As Long, lHeight As Long
m_lEditRow = lRow
m_lEditCol = lCol
' Disabling the built-in editor
bCancel = True
' Calculating the position of the current cell
iGrid1.CellBoundary lRow, lCol, lLeft, lTop, lWidth, lHeight
' Moving DateTimePicker to the current cell
' Important! CellBoundary returns coordinates in pixels.
' We add 2 pixels to take into account iGrid border
' (2 pixels from each side for the default 3D border)
DTPicker1.Move _
iGrid1.Left + (lLeft + 2) * Screen.TwipsPerPixelX, _
iGrid1.Top + (lTop + 2) * Screen.TwipsPerPixelY, _
(lWidth - 1) * Screen.TwipsPerPixelX, _
(lHeight - 1) * Screen.TwipsPerPixelY
' Setting the value of the external control
DTPicker1.Value = iGrid1.CellValue(lRow, lCol)
' Activating the DateTimePicker control
DTPicker1.Visible = True
DTPicker1.SetFocus
End Sub
If you encounter any troubles with implementing this in Excel, you can send us your project to the tech support address, and we'll help you to finish it.