OVH Cloud OVH Cloud

Imprimer feuille cachée

3 réponses
Avatar
surplus
Bonjour,
j'ai un soucis je voudrais imprimer une feuille cachée "Imprim" plage d'impression B2:H60
avec un prewiew avant d'imprimer
j'ai adapté ce code mais c'est pas bon

Private Sub CommandButton10_Click()
With Sheets("Imprim")
'--- Transfert Formulaire dans Imprim
.Range("N1") = Me.Nom
End With
Application.ScreenUpdating = True
Sheets("Imprim").Visible = True
Sheets("Imprim").PrintOut Copies:=2, Collate:=True, _
IgnorePrintAreas:=False
Sheets("Imprim").Visible = False
End Sub

3 réponses

Avatar
LSteph
Bonjour,

With Feuil2
.Visible = xlSheetVisible
.PrintPreview
.Visible = xlSheetHidden
End With


--
LSteph

"surplus" a écrit dans le message
de news:
Bonjour,
j'ai un soucis je voudrais imprimer une feuille cachée "Imprim" plage
d'impression B2:H60
avec un prewiew avant d'imprimer
j'ai adapté ce code mais c'est pas bon

Private Sub CommandButton10_Click()
With Sheets("Imprim")
'--- Transfert Formulaire dans Imprim
Range("N1") = Me.Nom
End With
Application.ScreenUpdating = True
Sheets("Imprim").Visible = True
Sheets("Imprim").PrintOut Copies:=2, Collate:=True, _
IgnorePrintAreas:úlse
Sheets("Imprim").Visible = False
End Sub
Avatar
surplus
Le mercredi 17 Octobre 2012 à 07:00 par surplus :
Bonjour,
j'ai un soucis je voudrais imprimer une feuille cachée
"Imprim" plage d'impression B2:H60
avec un prewiew avant d'imprimer
j'ai adapté ce code mais c'est pas bon

Private Sub CommandButton10_Click()
With Sheets("Imprim")
'--- Transfert Formulaire dans Imprim
.Range("N1") = Me.Nom
End With
Application.ScreenUpdating = True
Sheets("Imprim").Visible = True
Sheets("Imprim").PrintOut Copies:=2, Collate:=True, _
IgnorePrintAreas:úlse
Sheets("Imprim").Visible = False
End Sub


bonjour
merci de votre réponse
excel bloque sur le preview et je suis obligé de fermer excel avec ctrl,alt, supp
je ne comprends pas du tout pourquoi
une idée
merci
a bientôt
Avatar
surplus
Le mercredi 17 Octobre 2012 à 07:00 par surplus :
Bonjour,
j'ai un soucis je voudrais imprimer une feuille cachée
"Imprim" plage d'impression B2:H60
avec un prewiew avant d'imprimer
j'ai adapté ce code mais c'est pas bon

Private Sub CommandButton10_Click()
With Sheets("Imprim")
'--- Transfert Formulaire dans Imprim
.Range("N1") = Me.Nom
End With
Application.ScreenUpdating = True
Sheets("Imprim").Visible = True
Sheets("Imprim").PrintOut Copies:=2, Collate:=True, _
IgnorePrintAreas:úlse
Sheets("Imprim").Visible = False
End Sub


bonjour
laissez j'ai trouvé le problème
il fallait que je ferme l'userform avant d'executer la macro
voici la solution
Private Sub CommandButton10_Click()
Unload Me
With Sheets("Imprim")
' Transfert Formulaire dans Imprim
.Range("N1") = Me.Nom
End With
Application.ScreenUpdating = True
Sheets("Imprim").Visible = True
Sheets("Imprim").PrintOut Copies:=2, Collate:=True, _
IgnorePrintAreas:úlse
Sheets("Imprim").Visible = False
End Sub
merci de votre aide
a bientot