Beruflich Dokumente
Kultur Dokumente
MsgBox "la cellele s�l�ctionne� est au niveau da la ligne " & ActiveCell.Row
MsgBox "la cellele s�l�ctionne� est au niveau da la ligne " & ActiveCell.Column
End Sub
Public Sub Dame()
l = ActiveCell.Row
c = ActiveCell.Column
For i = 0 To 7
Cells(l + i, c + i).ColumnWidth = 10.71
Cells(l + i, c + i).RowHeight = 60
For j = 0 To 7
If (i + j) Mod 2 = 0 Then Cells(l + i, c + j).Interior.Color = RGB(255, 0, 0)
Next
Next
End Sub
Public Sub Dame1()
l = ActiveCell.Row
c = ActiveCell.Column
For i = 0 To 7
Cells(l + i, c + i).ColumnWidth = 10.71
Cells(l + i, c + i).RowHeight = 60
For j = 0 To 7
If (i + j) Mod 2 = 0 Then
Cells(l + i, c + j).Interior.Color = RGB(255, 0, 0)
Else
Cells(l + i, c + j).Interior.Color = RGB(0, 255, 0)
End If
Next
Next
End Sub
Public Sub afichage_produit_multiplication()
l = ActiveCell.Row
c = ActiveCell.Column
n = InputBox("entrer le nombre de cot�")
For i = 1 To n
Cells(l + i, c) = i
Cells(l, c + i) = i
Next
For i = 1 To n
For j = 1 To n
Cells(l + i, c + j) = i ^ j
Next
Next
End Sub
Cells(l, c) = "N�"
Cells(l, c + 1) = "Designation"
Cells(l, c + 2) = "U"
Cells(l, c + 3) = "Qte"
Cells(l, c + 4) = "PU"
Cells(l, c + 5) = "Montant"
For i = 0 To 5
Cells(l, c + i).Interior.Color = RGB(220, 220, 220)
Next
For i = 0 To 5
For j = 0 To 20
Cells(l + j, c + i).Borders(xlEdgeBottom).Color = RGB(0, 0, 0)
Cells(l + j, c + i).Borders(xlEdgeTop).Color = RGB(0, 0, 0)
Cells(l + j, c + i).Borders(xlEdgeLeft).Color = RGB(0, 0, 0)
Cells(l + j, c + i).Borders(xlEdgeRight).Color = RGB(0, 0, 0)
Next
Next
'------------------------------------------------
Cells(l + 22, c + 4) = " Total H.T"
Cells(l + 23, c + 4) = " 20 % de T.V.A."
Cells(l + 24, c + 4) = " Total T.T.C."
For i = 22 To 24
Cells(l + i, c + 4).Interior.Color = RGB(220, 220, 220)
Cells(l + i, c + 4).Font.Bold = True
Cells(l + i, c + 4).HorizontalAlignment = xlLeft
Cells(l + i, c + 4).VerticalAlignment = xlCenter
Next
For i = 0 To 1
For j = 0 To 2
Cells(l + 22 + j, c + 4 + i).Borders(xlEdgeBottom).Color = RGB(0, 0, 0)
Cells(l + 22 + j, c + 4 + i).Borders(xlEdgeTop).Color = RGB(0, 0, 0)
Cells(l + 22 + j, c + 4 + i).Borders(xlEdgeLeft).Color = RGB(0, 0, 0)
Cells(l + 22 + j, c + 4 + i).Borders(xlEdgeRight).Color = RGB(0, 0, 0)
Next
Next
Cells(100000, 16000).Value = l
Cells(100001, 16000).Value = c
End Sub
End Sub
End Sub
Select Case n
Case 0
result = "z�ro"
Case 1
result = "un"
Case 2
result = "deux"
Case 3
result = "trois"
Case 4
result = "quatre"
Case 5
result = "cinq"
Case 6
result = "six"
Case 7
result = "sept"
Case 8
result = "huit"
Case 9
result = "neuf"
MsgBox result
End Select
End Sub
MsgBox result
End Sub
Function unite(u)
Select Case u
Case 0: unite = "z�ro"
Case 1: unite = "un"
Case 2: unite = "deux"
Case 3: unite = "trois"
Case 4: unite = "quatre"
Case 5: unite = "cinq"
Case 6: unite = "six"
Case 7: unite = "sept"
Case 8: unite = "huit"
Case 9: unite = "neuf"
End Select
End Function
Function vingt(v)
Select Case v
Case 11: vingt = "onze"
Case 12: vingt = "un"
Case 13: vingt = "deux"
Case 14: vingt = "trois"
Case 15: vingt = "quatre"
Case 16: vingt = "cinq"
Case 17: vingt = "six"
Case 18: vingt = "sept"
Case 19: vingt = "huit"
Case 20: vingt = "vingt"
End Select
End Function
Public Sub Num�roenlettre3()
n = ActiveCell.Value
If n = 0 Then
result = "z�ro"
ElseIf n <= 10 Then
result = unite(n)
ElseIf n < 20 Then
result = vingt(n)
ElseIf n < 70 Then
If n Mod 10 = 1 Then
result = dizaine(Int(n / 10)) & " et " & unite(n Mod 10)
Else
result = dizaine(Int(n / 10)) & " " & unite(n Mod 10)
End If
ElseIf n < 100 Then
If n Mod 10 = 1 Then
result = dizaine(Int(n / 10) - 1) & " et " & vingt(n - (Int(n / 10) - 1) * 10)
Else
result = dizaine(Int(n / 10) - 1) & " " & vingt(n - (Int(n / 10) - 1) * 10)
End If
Else
result = "Pas encore"
MsgBox result
End Sub
Function cent(c)
n = ActiveCell.Value
If n = 0 Then
result = "z�ro"
ElseIf n <= 10 Then
result = unite(n)
ElseIf n < 20 Then
result = vingt(n)
ElseIf n < 70 Then
If n Mod 10 = 1 Then
result = dizaine(Int(n / 10)) & " et " & unite(n Mod 10)
Else
result = dizaine(Int(n / 10)) & " " & unite(n Mod 10)
End If
ElseIf n < 100 Then
If n Mod 10 = 1 Then
result = dizaine(Int(n / 10) - 1) & " et " & vingt(n - (Int(n / 10) - 1) * 10)
Else
result = dizaine(Int(n / 10) - 1) & " " & vingt(n - (Int(n / 10) - 1) * 10)
End If
Else
result = "Pas encore"
MsgBox result
End Sub
Function mille()
If n < 100 Then
mille = cent(n)
ElseIf n = 100 Then
mille = "cent"
End Function