Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
If Button = vbRightButton Then
' Do Something for a right button click
Else
' Do Something Else for the left button.
End If
If Button = vbRightButton Then
' Do Something for a right button click
[b]PopupMenu mnuSelect[/b]
Else
' Do Something Else for the left button.
End If
Dim blnGridClickSw as Boolean
Dim lngMouseColHold as Long
Dim lngMouseRowHold as Long
Sub Grid1_Click()
'Thow away unwanted click events
If blnGridClickSw Then Exit Sub
'See if a fixed col or row was clicked
If lngMouseColHold <= grdDiary.FixedCols - 1 Then Exit Sub
If lngMouseRowHold <= grdDiary.FixedRows - 1 Then Exit Sub
blnGridClickSw = True
'Set the selected col and row to where the left or right mouse was clicked
grdDiary.Col = lngMouseColHold
grdDiary.Row = lngMouseRowHold
If blnRightButtonPressed Then
blnRightButtonPressed = False
PopupMenu mnuPopUp, vbPopupMenuRightButton
etc etc for right button
Else
etc etc for left button
End If
End Sub
Private Sub Grid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
lngMouseColHold = grdDiary.MouseCol
lngMouseRowHold = grdDiary.MouseRow
If Button = vbRightButton Then
blnRightButtonPressed = True
Else
blnRightButtonPressed = False
End If
End Sub
Private Sub myGrid_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
[COLOR=green]' A click on the control that is not inside the grid
' will generate an error so you need to trap it.[/color]
On Error GoTo NotOnARow
myGrid.Row = myGrid.RowContaining ( Y )
If Button = vbRightButton Then
' Do Something for a right button click
PopupMenu mnuSelect
Else
' Do Something Else for the left button.
End If
Exit Sub
NotOnARow:
End Sub