1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
' Feuille 2 ,
Dim ScrollSaved As Integer
Dim x As String
Dim y As String
Dim z As String
Dim xN As Variant
Dim xA As Variant
Dim a As Variant
Dim xRouge As Integer
Dim xGrun As Integer
Dim xBleu As Integer
Private anc As range
Sub initial()
Beep
xNumPal = range("numPal").Value
Worksheets("Feuil2").range("H12").Value = xNumPal
End Sub
Sub chiffres() ' numéros de correspondance des couleurs de 1 à 7 (ou 4 ou 8 ou autre)
Application.ScreenUpdating = False
For iLin = 1 To 47
For iCol = 1 To 40
x = Worksheets("Feuil3").Cells(iLin, iCol).Value
For iListe = 5 To 11 ' zListe
y = Worksheets("Feuil7").Cells(iListe, 1).Value
If y = x Then
xN = Worksheets("Feuil7").Cells(iListe, 4).Value
End If
nX = Worksheets("Feuil5").Cells(iLin, iCol).Value
' Worksheets("Feuil4").Cells(iLin, iCol).Value = " =," & nX
Next iListe
' Worksheets("Feuil5").Cells(zListe, 2).Value = iCol
' Worksheets("Feuil5").Cells(zListe, 3).Value = iLin
zListe = zListe + 1
suite:
Next iCol
Next iLin
End Sub
Private Sub ScrollBarR_Change()
xRouge = ScrollBarR.Value
' Worksheets("Feuil2").Range("D13").Value = xRouge1
' Worksheets("Feuil2").Range("H13").Value = xRouge
couleurChoisiePara
couleurChoisie
End Sub
Private Sub ScrollBarG_Change()
xGrun = ScrollBarG.Value
' Worksheets("Feuil2").Range("D14").Value = xGrun1
couleurChoisiePara
couleurChoisie
End Sub
Private Sub ScrollBarB_Change()
xBleu = ScrollBarB.Value
' Worksheets("Feuil2").Range("D15").Value = xBleu1
couleurChoisiePara
couleurChoisie
End Sub
Sub couleurChoisie()
Worksheets("Feuil2").range("zonCarCoul").Cells(1, 1).Interior.Color = RGB(xRouge, xGrun, xBleu)
Worksheets("Feuil2").range("D13").Interior.Color = RGB(xRouge, 0, 0)
Worksheets("Feuil2").range("E13").Interior.Color = RGB(0, xGrun, 0)
Worksheets("Feuil2").range("F13").Interior.Color = RGB(0, 0, xBleu)
' Worksheets("Feuil4").Range("AR39:AT41").Value = xRouge1 & ", " & xGrun1 & ", " & xBleu1
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As range)
If anc Is Nothing Then Set anc = Target
If Not IsNumeric(anc.Value) Then
MsgBox "pas un numérique"
anc.Activate
Else
Set anc = Target
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As range)
If Target = range("G12") Then
initial
End If
End Sub
Private Sub CheckBox1_Change()
Beep
initial
End Sub
Sub couleurChoisiePara()
ActiveWorkbook.Colors(1) = RGB(xRouge, xGrun, xBleu)
Worksheets("Feuil2").range("zonCarCoul").Cells(1, -4).Interior.ColorIndex = 1
Worksheets("Feuil2").range("zonCarCoul").Cells(1, 1).Interior.Color = RGB(xRouge, xGrun, xBleu)
Worksheets("Feuil2").range("H13").Value = xRouge
Worksheets("Feuil2").range("I13").Value = xGrun
Worksheets("Feuil2").range("J13").Value = xBleu
' Worksheets("Feuil4").Range("AR39:AT41").Value = xRouge1 & ", " & xGrun1 & ", " & xBleu1
End Sub |
Partager