"L'indice n'appartient à la sélection" + VBA
fleur.31
Messages postés
3
Statut
Membre
-
geosevda -
geosevda -
Bonjour,
Nous avons un problème dans la programmation de notre VBA. Voici notre programme:
Sub Bloucle1Bull()
Dim a, k As Integer
k = 2
Do While Worksheets("formulaire").Cells(2, 2) <> Worksheets("formulaire").Cells(k, 4)
k = k + 1
Loop
a = 2
Do While Worksheets("formulaire").Cells(k + 1, 4) <> Worksheets("BDD Call").Cells(a, 1) Or (Worksheets("BDD Call").Cells(a, 4) <= (Worksheets("bullspread").Cells(2, 3) - 100) Xor Worksheets("BDD Call").Cells(a, 4) >= (Worksheets("Bullspread").Cells(2, 3) + 100)) Or Worksheets("BDD Call").Cells(a, 7) <> Worksheets("bullspread").Cells(2, 7)
a = a + 1
Loop
''''''''''''on recopie la ligne du premier call trouvé pour le jour 2 dans bullspread'''''''
Worksheets("BDD Bullspread").Cells(3, 1) = Worksheets("BDD call").Cells(a, 1)
Worksheets("BDD Bullspread").Cells(3, 2) = Worksheets("BDD call").Cells(a, 3)
Worksheets("BDD Bullspread").Cells(3, 3) = Worksheets("BDD call").Cells(a, 4)
Worksheets("BDD Bullspread").Cells(3, 4) = Worksheets("BDD call").Cells(a, 5)
Worksheets("BDD Bullspread").Cells(3, 5) = Worksheets("BDD call").Cells(a, 6)
Worksheets("BDD Bullspread").Cells(3, 6) = Worksheets("BDD call").Cells(a, 7)
Worksheets("BDD Bullspread").Cells(3, 7) = Worksheets("BDD call").Cells(a, 8)
Worksheets("BDD Bullspread").Cells(3, 8) = Worksheets("BDD call").Cells(a, 9)
Worksheets("BDD Bullspread").Cells(3, 9) = Worksheets("BDD call").Cells(a, 10)
End Sub
Quand on lance lamacro, un message s'annonce comme quoi "lindice n'appartient à la sélection"...
Quelqu'un pourrait nous aider svp??
Nous avons un problème dans la programmation de notre VBA. Voici notre programme:
Sub Bloucle1Bull()
Dim a, k As Integer
k = 2
Do While Worksheets("formulaire").Cells(2, 2) <> Worksheets("formulaire").Cells(k, 4)
k = k + 1
Loop
a = 2
Do While Worksheets("formulaire").Cells(k + 1, 4) <> Worksheets("BDD Call").Cells(a, 1) Or (Worksheets("BDD Call").Cells(a, 4) <= (Worksheets("bullspread").Cells(2, 3) - 100) Xor Worksheets("BDD Call").Cells(a, 4) >= (Worksheets("Bullspread").Cells(2, 3) + 100)) Or Worksheets("BDD Call").Cells(a, 7) <> Worksheets("bullspread").Cells(2, 7)
a = a + 1
Loop
''''''''''''on recopie la ligne du premier call trouvé pour le jour 2 dans bullspread'''''''
Worksheets("BDD Bullspread").Cells(3, 1) = Worksheets("BDD call").Cells(a, 1)
Worksheets("BDD Bullspread").Cells(3, 2) = Worksheets("BDD call").Cells(a, 3)
Worksheets("BDD Bullspread").Cells(3, 3) = Worksheets("BDD call").Cells(a, 4)
Worksheets("BDD Bullspread").Cells(3, 4) = Worksheets("BDD call").Cells(a, 5)
Worksheets("BDD Bullspread").Cells(3, 5) = Worksheets("BDD call").Cells(a, 6)
Worksheets("BDD Bullspread").Cells(3, 6) = Worksheets("BDD call").Cells(a, 7)
Worksheets("BDD Bullspread").Cells(3, 7) = Worksheets("BDD call").Cells(a, 8)
Worksheets("BDD Bullspread").Cells(3, 8) = Worksheets("BDD call").Cells(a, 9)
Worksheets("BDD Bullspread").Cells(3, 9) = Worksheets("BDD call").Cells(a, 10)
End Sub
Quand on lance lamacro, un message s'annonce comme quoi "lindice n'appartient à la sélection"...
Quelqu'un pourrait nous aider svp??
A voir également:
- L'indice n'appartient pas à la sélection vba
- L'indice n'appartient pas à la sélection - Meilleures réponses
- Vba l'indice n'appartient pas à la sélection - Meilleures réponses
- Erreur d'execution 9, l'indice n'appartient pas à la sélection ✓ - Forum Programmation
- Indice téléphonique - Guide
- Vba l'indice n'appartient pas à la sélection ✓ - Forum Excel
- A qui appartient ce numéro - Guide
- Vba l'indice n'appartient pas a la selection - Forum VB / VBA
Dim oFSO As Scripting.FileSystemObject
Dim oTxt As Scripting.TextStream
With oTxt
Dim TestArray() As String
Dim st As String
Dim i As Integer
Dim tRows As Long
Dim tCols As Long
Dim ligne As AcadLine
Set oFSO = New Scripting.FileSystemObject
Set oTxt = oFSO.OpenTextFile(txtDWGname.Text, ForReading)
With oTxt
While Not .AtEndOfStream
st = oTxt.ReadLine
TestArray() = split(st, ";")
Dim TestArrayField As Integer
tRows = .Line
tCols = .Column
For i = 0 To tRows
MsgBox TestArray(i)
Next
Wend
End With
oTxt.Close
End With