Bonjour a tous,
J'ai ce morceau de code et quand j'exécute mon programme il me dit:
Case Else en dehors d'un bloc Select case en pointant "Case Else"
Je ne vois vraiment pas d'ou vient le probleme. Une petite aide serai la bienvenue.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 If laComboBox = "comboBoxChamps" Then variable = "B" Else variable = "A" End If Select Case variable Case "B" For Each Cell In VBAProject.Feuil2.Range("B1:B" & Range("B65536").End(xlUp).Row) Case Else For Each Cell In VBAProject.Feuil2.Range("A1:A" & Range("A65536").End(xlUp).Row) End Select
Merci par avance.
Partager