Vba variable tableau
Fermé
asterrax
Messages postés
12
Date d'inscription
vendredi 9 mars 2012
Statut
Membre
Dernière intervention
16 décembre 2012
-
16 déc. 2012 à 21:56
Patrice33740 Messages postés 8556 Date d'inscription dimanche 13 juin 2010 Statut Membre Dernière intervention 2 mars 2023 - 20 déc. 2012 à 14:07
Patrice33740 Messages postés 8556 Date d'inscription dimanche 13 juin 2010 Statut Membre Dernière intervention 2 mars 2023 - 20 déc. 2012 à 14:07
A voir également:
- Vba variable tableau
- Ce programme est écrit en python. il construit un mot secret dans une variable mais il ne l'affiche pas. modifiez-le pour qu'il affiche le mot secret. exécutez-le. quel est ce mot secret ? ✓ - Forum Python
- Vba range avec variable ✓ - Forum VB / VBA
- Tableau croisé dynamique - Guide
- Erreur 1004 vba ✓ - Forum VB / VBA
- Vba selection plage variable ✓ - Forum VB / VBA
1 réponse
Patrice33740
Messages postés
8556
Date d'inscription
dimanche 13 juin 2010
Statut
Membre
Dernière intervention
2 mars 2023
1 762
20 déc. 2012 à 14:07
20 déc. 2012 à 14:07
Essaies :
Option Explicit
Sub Test()
Dim variable() As Variant
Dim i As Integer
ReDim variable(1 To 3)
variable(1) = "vous n'avez saisi aucune condition"
variable(2) = 10
variable(3) = 15
Cells(1, 1).Value = 10
For i = LBound(variable) To UBound(variable)
If IsNumeric(variable(i)) Then
If variable(i) > Cells(1, 1).Value Then
MsgBox "Variable = " & i & " quelque chose"
Else
MsgBox "Variable = " & i & " autre chose"
End If
End If
Next
End Sub