bonjour le forum
je comprend pas ce code qui fonctionnait , s'arrete a MAINTENANT 33%
ERREUR 1004 La methode select de woorksheet a echoué
merci pour votre aide stephane
stephane
Sub Noir_et_blanc()
Application.ScreenUpdating = False
Dim iWsh As Integer
Dim oWsh As Worksheet
Dim PctDone As Single
iWsh = ThisWorkbook.Worksheets.Count
For Each oWsh In ThisWorkbook.Worksheets
PctDone = oWsh.Index / iWsh
With userfbarrenoir
.FrameProgress.Caption = Format(PctDone, "0%")
.LabelProgress.Width = PctDone * (.FrameProgress.Width - 10)
End With
' The DoEvents statement is responsible for the form updating
DoEvents
oWsh.Select😕bloque la
ActiveSheet.PageSetup.PrintArea = "$A$1:$W$55"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0)
.RightMargin = Application.InchesToPoints(0)
.TopMargin = Application.InchesToPoints(0)
.BottomMargin = Application.InchesToPoints(0)
.HeaderMargin = Application.InchesToPoints(0)
.FooterMargin = Application.InchesToPoints(0)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = -3
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = True
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = True
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
'apercu
'ActiveWindow.SelectedSheets.PrintPreview
Next oWsh
Application.ScreenUpdating = True
Unload userfbarrenoir
End Sub
je comprend pas ce code qui fonctionnait , s'arrete a MAINTENANT 33%
ERREUR 1004 La methode select de woorksheet a echoué
merci pour votre aide stephane
stephane
Sub Noir_et_blanc()
Application.ScreenUpdating = False
Dim iWsh As Integer
Dim oWsh As Worksheet
Dim PctDone As Single
iWsh = ThisWorkbook.Worksheets.Count
For Each oWsh In ThisWorkbook.Worksheets
PctDone = oWsh.Index / iWsh
With userfbarrenoir
.FrameProgress.Caption = Format(PctDone, "0%")
.LabelProgress.Width = PctDone * (.FrameProgress.Width - 10)
End With
' The DoEvents statement is responsible for the form updating
DoEvents
oWsh.Select😕bloque la
ActiveSheet.PageSetup.PrintArea = "$A$1:$W$55"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0)
.RightMargin = Application.InchesToPoints(0)
.TopMargin = Application.InchesToPoints(0)
.BottomMargin = Application.InchesToPoints(0)
.HeaderMargin = Application.InchesToPoints(0)
.FooterMargin = Application.InchesToPoints(0)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = -3
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = True
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = True
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
'apercu
'ActiveWindow.SelectedSheets.PrintPreview
Next oWsh
Application.ScreenUpdating = True
Unload userfbarrenoir
End Sub