Bonjour tout le monde,
J'ai le code ci-dessous que je souhaite l'améliorer en vérifiant si il y a une cellule vide dans ma ligne.
En fait je veux vérifier dans une ligne donnée si je trouve une cellule vide alors je passe à la ligne suivante mais qd je mets une condition
(if cells("oL", "oC") <> " " then) ca marche pas
svp si vous avez des remarques sur ce code
merci
Sub test()
Sep = "#"
With Worksheets("Feuil1")
Set Plage = .Range("A1").CurrentRegion
End With
chemin = ThisWorkbook.Path & "\"
Open chemin & "test.1" & ".txt" For Output As #1
For Each oL In Plage.Rows
Tmp = ""
For Each oc In oL.Cells
if cells("oL", "oC") <> " " then
Tmp = Tmp & CStr(oc.Text) & Sep
Endif
Next
Print #1, Tmp
Next
Close
End Sub