Bug Macro avec Option Explicit
Bonsoir a tous,
Depuis l'ajout de Option explicit la macro bug sinon elle fonctionne bien.
Variable?
Merci de vous éventuels retours
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| Option explicit
Sub PageMenu()
'
' PageMenu Macro
' Macro enregistrée par ***
Dim nombre As Integer
nombre = ActiveWorkbook.Sheets.Count
Application.ScreenUpdating = False
For I = 1 To nombre
Worksheets(I).Unprotect Password:="blabla"
Next I
Application.ScreenUpdating = False
AfficherOnglets
Sheets("Janvier 2014").Select
Range("A1").Select
End Sub |
Bug dans ce module également
Bonjour à tous,
Bug à la ligne ModeRecalcul
Merci pour vos éventuels retours
Cordialement
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Option Explicit
Sub SuppColonnesVides()
ActiveSheet.Unprotect
ModeRecalcul = Application.Calculation
' Réglage du recalcul sur mode manuel
Application.Calculation = xlCalculationManual
With ActiveSheet.UsedRange
dercol = .Column + .Columns.Count - 1
End With
Application.ScreenUpdating = False
For c = dercol To 1 Step -1
If Application.CountA(Columns(c)) = 0 Then Columns(c).Delete
Next c
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, _
Scenarios:=True
Application.Calculation = ModeRecalcul
End Sub |