Bonjour,
j'ai un userform qui me va très bien pour l'impression. j'ai ce code qui me
permet d'imprimer les page 2 à 12 si y'a pas "N/A" en A4, et je voudrais
l'adapter pour avoir non pas les pages 2 à 12, mais les feuilles "GA02",
"GA03", "GA07", "GA09".
Merci d'avance.
j'ai essayé avec un With i = Sheets("GA01", "GA02") sans succès
Merci.
YANN
------
Case "Le dossier général"
'imprime le dossier général de la page 2 à la page 12
For i = 2 To 12
Set Sh = Sheets(i)
If Not UCase(Trim(Sh.Cells(4, 1).Value)) = "NA" Then
Debug.Print Sh.Name
memVisible = Sh.Visible
Sh.Visible = True
Sh.PrintOut
Sh.Visible = memVisible
End If
Next
------
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Corto
Bonjour Sunburn, Essaye comme ça : For each sh in Sheets(Array("GA01", "GA02", "GA03", "GA07", "GA09")) If Not UCase(Trim(Sh.Cells(4, 1).Value)) = "NA" Then .......... End If Next
Bonjour Sunburn,
Essaye comme ça :
For each sh in Sheets(Array("GA01", "GA02", "GA03", "GA07", "GA09"))
If Not UCase(Trim(Sh.Cells(4, 1).Value)) = "NA" Then
..........
End If
Next
Bonjour Sunburn, Essaye comme ça : For each sh in Sheets(Array("GA01", "GA02", "GA03", "GA07", "GA09")) If Not UCase(Trim(Sh.Cells(4, 1).Value)) = "NA" Then .......... End If Next
Bonjour Sunburn, Essaye comme ça : For each sh in Sheets(Array("GA01", "GA02", "GA03", "GA07", "GA09")) If Not UCase(Trim(Sh.Cells(4, 1).Value)) = "NA" Then .......... End If Next
Corto
Sunburn a écrit : > Bonjour, > j'ai un userform qui me va très bien pour l'impression. j'ai ce code qui me > permet d'imprimer les page 2 à 12 si y'a pas "N/A" en A4, et je voudrais > l'adapter pour avoir non pas les pages 2 à 12, mais les feuilles "GA02", > "GA03", "GA07", "GA09". > Merci d'avance. > j'ai essayé avec un With i = Sheets("GA01", "GA02") sans succès > Merci. > YANN > ------ > Case "Le dossier général" > 'imprime le dossier général de la page 2 à la page 12 > For i = 2 To 12 > Set Sh = Sheets(i) > If Not UCase(Trim(Sh.Cells(4, 1).Value)) = "NA" Then > Debug.Print Sh.Name > memVisible = Sh.Visible > Sh.Visible = True > Sh.PrintOut > Sh.Visible = memVisible > End If > Next > ------ >
Impecable, merci.
YANN
"Corto" a écrit :
Bonjour Sunburn,
Essaye comme ça :
For each sh in Sheets(Array("GA01", "GA02", "GA03", "GA07", "GA09"))
If Not UCase(Trim(Sh.Cells(4, 1).Value)) = "NA" Then
..........
End If
Next
Corto
Sunburn a écrit :
> Bonjour,
> j'ai un userform qui me va très bien pour l'impression. j'ai ce code qui me
> permet d'imprimer les page 2 à 12 si y'a pas "N/A" en A4, et je voudrais
> l'adapter pour avoir non pas les pages 2 à 12, mais les feuilles "GA02",
> "GA03", "GA07", "GA09".
> Merci d'avance.
> j'ai essayé avec un With i = Sheets("GA01", "GA02") sans succès
> Merci.
> YANN
> ------
> Case "Le dossier général"
> 'imprime le dossier général de la page 2 à la page 12
> For i = 2 To 12
> Set Sh = Sheets(i)
> If Not UCase(Trim(Sh.Cells(4, 1).Value)) = "NA" Then
> Debug.Print Sh.Name
> memVisible = Sh.Visible
> Sh.Visible = True
> Sh.PrintOut
> Sh.Visible = memVisible
> End If
> Next
> ------
>
Bonjour Sunburn, Essaye comme ça : For each sh in Sheets(Array("GA01", "GA02", "GA03", "GA07", "GA09")) If Not UCase(Trim(Sh.Cells(4, 1).Value)) = "NA" Then .......... End If Next
Corto
Sunburn a écrit : > Bonjour, > j'ai un userform qui me va très bien pour l'impression. j'ai ce code qui me > permet d'imprimer les page 2 à 12 si y'a pas "N/A" en A4, et je voudrais > l'adapter pour avoir non pas les pages 2 à 12, mais les feuilles "GA02", > "GA03", "GA07", "GA09". > Merci d'avance. > j'ai essayé avec un With i = Sheets("GA01", "GA02") sans succès > Merci. > YANN > ------ > Case "Le dossier général" > 'imprime le dossier général de la page 2 à la page 12 > For i = 2 To 12 > Set Sh = Sheets(i) > If Not UCase(Trim(Sh.Cells(4, 1).Value)) = "NA" Then > Debug.Print Sh.Name > memVisible = Sh.Visible > Sh.Visible = True > Sh.PrintOut > Sh.Visible = memVisible > End If > Next > ------ >
isabelle
bonjour Yann,
liste = Array(2, 3, 7, 9) For Each a In liste Set sh = Sheets("GA0" & a)
isabelle
Sunburn a écrit :
Bonjour, j'ai un userform qui me va très bien pour l'impression. j'ai ce code qui me permet d'imprimer les page 2 à 12 si y'a pas "N/A" en A4, et je voudrais l'adapter pour avoir non pas les pages 2 à 12, mais les feuilles "GA02", "GA03", "GA07", "GA09". Merci d'avance. j'ai essayé avec un With i = Sheets("GA01", "GA02") sans succès Merci. YANN ------ Case "Le dossier général" 'imprime le dossier général de la page 2 à la page 12 For i = 2 To 12 Set Sh = Sheets(i) If Not UCase(Trim(Sh.Cells(4, 1).Value)) = "NA" Then Debug.Print Sh.Name memVisible = Sh.Visible Sh.Visible = True Sh.PrintOut Sh.Visible = memVisible End If Next ------
bonjour Yann,
liste = Array(2, 3, 7, 9)
For Each a In liste
Set sh = Sheets("GA0" & a)
isabelle
Sunburn a écrit :
Bonjour,
j'ai un userform qui me va très bien pour l'impression. j'ai ce code qui me
permet d'imprimer les page 2 à 12 si y'a pas "N/A" en A4, et je voudrais
l'adapter pour avoir non pas les pages 2 à 12, mais les feuilles "GA02",
"GA03", "GA07", "GA09".
Merci d'avance.
j'ai essayé avec un With i = Sheets("GA01", "GA02") sans succès
Merci.
YANN
------
Case "Le dossier général"
'imprime le dossier général de la page 2 à la page 12
For i = 2 To 12
Set Sh = Sheets(i)
If Not UCase(Trim(Sh.Cells(4, 1).Value)) = "NA" Then
Debug.Print Sh.Name
memVisible = Sh.Visible
Sh.Visible = True
Sh.PrintOut
Sh.Visible = memVisible
End If
Next
------
liste = Array(2, 3, 7, 9) For Each a In liste Set sh = Sheets("GA0" & a)
isabelle
Sunburn a écrit :
Bonjour, j'ai un userform qui me va très bien pour l'impression. j'ai ce code qui me permet d'imprimer les page 2 à 12 si y'a pas "N/A" en A4, et je voudrais l'adapter pour avoir non pas les pages 2 à 12, mais les feuilles "GA02", "GA03", "GA07", "GA09". Merci d'avance. j'ai essayé avec un With i = Sheets("GA01", "GA02") sans succès Merci. YANN ------ Case "Le dossier général" 'imprime le dossier général de la page 2 à la page 12 For i = 2 To 12 Set Sh = Sheets(i) If Not UCase(Trim(Sh.Cells(4, 1).Value)) = "NA" Then Debug.Print Sh.Name memVisible = Sh.Visible Sh.Visible = True Sh.PrintOut Sh.Visible = memVisible End If Next ------