vb.net - How to ignore if a cell is empty nothing -


how use roscolor() ignore value (like empty cell) ? color row if value upper 5 when there nothing in cell, want ignore roscolor() apply, how?

public sub roscolor()     integer = 0 quotedatagridview1.rows.count() - 1 step +1         dim val integer         val = quotedatagridview1.rows(i).cells(3).value         if val = vbempty              quotedatagridview1.rows(i).defaultcellstyle.backcolor = color.white          elseif val < 5             quotedatagridview1.rows(i).defaultcellstyle.backcolor = color.red         elseif val > 5 , val < 10             quotedatagridview1.rows(i).defaultcellstyle.backcolor = color.lightyellow           end if      next  end sub 

you can check empty value following

public sub roscolor()     integer = 0 quotedatagridview1.rows.count() - 1 step +1         dim val = quotedatagridview1.rows(i).cells(3).value         if isdbnull(val) or val nothing             quotedatagridview1.rows(i).defaultcellstyle.backcolor = color.white         elseif cint(val) < 5             quotedatagridview1.rows(i).defaultcellstyle.backcolor = color.red         elseif cint(val) > 5 , cint(val) < 10             quotedatagridview1.rows(i).defaultcellstyle.backcolor = color.lightyellow         end if  

Comments

  1. Boost your salon’s visibility with Local seo for hair salon strategies by Premier Salon Marketing. Our expert team uses proven Local seo for hair salon techniques to help your business rank higher in local searches, attract nearby clients, and grow bookings. Choose Premier Salon Marketing to make Local seo for hair salon work effectively for your salon.
    Email Us
    info@premiersalonmarketing.com
    Call Us
    +1 424 777 2059

    ReplyDelete

Post a Comment

Popular posts from this blog

recursion - Can every recursive algorithm be improved with dynamic programming? -

Sort a complex associative array in PHP -