ADD a new condition ...

User avatar
sal21
PlatinumLounger
Posts: 4343
Joined: 26 Apr 2010, 17:36

ADD a new condition ...

Post by sal21 »

Actually this code call the class when in a cell is present a picture...

i need to add a new if condition when a cell is blank

in effect when the cell have a picture the ombrella is busy, in other case is free (cell is blank).

Code: Select all

Private Sub MSFlexGrid1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    With Me.MSFlexGrid1

        LASTCOL = .Cols - 1

        COLONNA = Empty
        RIGA = Empty

        COLONNA = .MouseCol
        RIGA = .MouseRow

        .Row = RIGA
        .Col = COLONNA

        If RIGA > 0 And COLONNA > 0 And COLONNA < LASTCOL And Me.CGIORNO.Text > "" And .CellPicture <> 0 Then

            Me.LTAG.Caption = Me.CGIORNO.Text
            GIORNO = Split(Me.CGIORNO.Text, "-")(1)
            Call FIND_PREZZO(RIGA, GIORNO)
            STRINGA = "FILA: " & RIGA & "-" & " NUMERO: " & COLONNA & " PREZZO: " & Me.LPREZZO.Caption

            Me.LCOLONNA.Caption = COLONNA
            Me.LRIGA.Caption = RIGA
            Me.LPREZZO.Caption = Me.LPREZZO.Caption

            If Not m_bInLable Then
                m_bInLable = True
                TT.Title = Me.CGIORNO.Text
                TT.TipText = STRINGA
                TT.Create .hwnd
            End If

        Else

            'Me.LCOLONNA.Caption = ""
           ' Me.LRIGA.Caption = ""
          '  Me.LPREZZO.Caption = ""

            If m_bInLable Then
                m_bInLable = False
                TT.Title = ""
                TT.TipText = ""
                TT.Destroy
            End If

        End If

    End With

End Sub
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: ADD a new condition ...

Post by HansV »

I'm sorry, I don't understand your question. Can you try to explain it more clearly?
Best wishes,
Hans