How to prevent pop up message twice

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rins
    New Member
    • Jun 2020
    • 1

    How to prevent pop up message twice

    Hi Team,

    I have a question about a msgbox that pops up twice instead of just one time.
    Note:Excel data is refreshing via ODBC connection and validating that sheet.
    Kindly help me on this.

    VBA code:
    Code:
    private sub worksheet_calculate()
    dim target as range
    set target=range("c1")
    if not intersect(target,range("c1") is nothing then
      if (thisworkbook.sheets("sheet1").range("a3").value="") then
        msgbox "Error"
      end if
    end if
    end sub
    Last edited by Banfa; Jun 26 '20, 10:20 AM. Reason: Added [code] tags and some indentation
Working...