lundi 14 décembre 2015

checkbox not working vba excel

this code marks cells from a table so they can be easily seen (its hardcoded but at least it works), the problem is that if i add a checkbox to the mix it doent work heres the code

  For x2 = 0 To j

    For x3 = 1 To 25

Hoja9.Cells(x2 + 4, 27) = Hoja9.Range("D" & x2 + 4).Row
If Hoja9.Range("D" & x2 + 4).Text = "#N/A" Then Hoja9.Cells(x2 + 4, 27) = (j + 3) '"#N/A"
If Hoja9.Cells(x2 + 4, x3).Text = "" Then Hoja9.Cells(x2 + 4, x3).Interior.ColorIndex = -4142
If Hoja9.Cells(x2 + 4, x3).Text = "#N/A" Then Hoja9.Cells(x2 + 4, x3).Interior.ColorIndex = -4142
Hoja9.Cells(x2 + 4, x3).Interior.ColorIndex = -4142

 Select Case CheckBox1 'why you no work?
Case Is = true
If Hoja9.Cells((Hoja9.Range("AA" & x2 + 4)), x3).Text = "#N/A" Then Hoja9.Cells(Hoja9.Range("AA" & x2 + 4), x3).Interior.ColorIndex = 35
If IsNumeric(Hoja9.Cells((Hoja9.Range("AA" & x2 + 4)), x3)) Then Hoja9.Cells((Hoja9.Range("AA" & x2 + 4)), x3).Interior.ColorIndex = 35
'If array_temp(b, 0) <= Hoja9.Cells(2, 4) Then Hoja9.Cells(b + 4, 4) = array_temp(b, 0)
   end select
     Next
    Next




Aucun commentaire:

Enregistrer un commentaire