'This detects clicking in a datasheet form's header row, and returns the column number. Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Y < 200 Then 'The height of the header row MsgBox Me.SelLeft - 1 End If End Sub