
Sub NASCONDI()
ActiveSheet.Unprotect Password = "luca1008"
ic = 2
ir = 3
For x = 1 To 2000
If Cells(ir, ic) = "VUOTO" Then
Cells(ir, ic).EntireRow.Hidden = True
End If
ir = ir + 1
x = x + 1
Next
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Sub SCOPRI()
ActiveSheet.Unprotect Password = "luca1008"
ic = 2
ir = 3
For x = 1 To 2000
If Cells(ir, ic) = "VUOTO" Then
Cells(ir, ic).EntireRow.Hidden = False
End If
ir = ir + 1
x = x + 1
Next
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
|
Option Explicit
Sub NASCONDI()
ActiveSheet.Unprotect Password:="luca1008"
Dim x As Long
For x = 1 To 2000
If Cells(x + 2, 2) = "VUOTO" Then
Cells(x + 2, 2).EntireRow.Hidden = True
End If
Next
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="luca1008"
End Sub
Sub SCOPRI()
ActiveSheet.Unprotect Password:="luca1008"
Dim x As Long
For x = 1 To 2000
If Cells(x + 2, 2) = "VUOTO" Then
Cells(x + 2, 2).EntireRow.Hidden = False
End If
Next
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="luca1008"
End Sub |
Sub NASCONDI()
Dim x As Long
ActiveSheet.Unprotect "luca1008"
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For x = 1 To 2000
If Cells(x + 2, 2) = "VUOTO" Then
Cells(x + 2, 2).EntireRow.Hidden = True
End If
Next
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
ActiveSheet.Protect "luca1008"
End Sub
Sub SCOPRI()
ActiveSheet.Unprotect Password:="luca1008"
Application.ScreenUpdating = False
Rows("1:10000").EntireRow.Hidden = False
Application.ScreenUpdating = True
ActiveSheet.Protect Password:="luca1008"
End Sub
|
Option Explicit
Sub NASCONDI()
Dim x As Long
Dim xlnCalc As XlCalculation
With Application
xlnCalc = .Calculation
.ActiveSheet.Unprotect "luca1008"
.ScreenUpdating = False
.Calculation = xlCalculationManual
End With
For x = 1 To 2000
If Cells(x + 2, 2) = "VUOTO" Then
Cells(x + 2, 2).EntireRow.Hidden = True
End If
Next
With Application
.Calculation = xlnCalc
.ScreenUpdating = True
.ActiveSheet.Protect "luca1008"
End With
End Sub |
