how to insert into the IF condition, a new condition, if mouse is on a filled cell with icon or image, else no action...
Code: Select all
If COLONNA >= 1 And COLONNA <= LASTDAY And RIGA >= 1 And ANNO > Empty And MESE > Empty Then
Code: Select all
Private Sub MSFlexGrid1_MouseMove(Button As Integer, Shift As Integer, X As Single, y As Single)
With Me.MSFlexGrid1
Me.LCOLONNA.Caption = .MouseCol
Me.LRIGA.Caption = .MouseRow
COLONNA = Me.LCOLONNA.Caption
RIGA = Me.LRIGA.Caption
If COLONNA >= 1 And COLONNA <= LASTDAY And RIGA >= 1 And ANNO > Empty And MESE > Empty Then
Me.LGIORNO.Caption = UCase(Format(DateSerial(ANNO, MESE, COLONNA), "DDD")) & "-" & DateSerial(ANNO, MESE, COLONNA)
TIPO = .TextMatrix(RIGA, 0)
'.Rows = RIGA
'.Cols = 0
'TIPO = .TextMatrix(1, 1)
Call TROVA_IN_ARRAY(TIPO)
'Debug.Print TIPO
Else
Me.LGIORNO.Caption = ""
Me.LSTANZA.Caption = ""
DoEvents
End If
End With
End Sub
in my case the icon/image is the green flag