trittico69 (Normal User)
Pro
Messaggi: 144
Iscritto: 02/04/2010
|
Questo codice, oltre a fare la sua funzione, alla fine mette la protezione(senza password) a 12 fogli
GEN-FEB-MAR-APR-MAG-GIU-LUG-AGO-SET-OTT-NOV-DIC ma vorrei escludere delle celle dove non voglio la protezione…e sono I8-M9-J12-O12-O9 e la colonna B di tutti i fogli elencati
Poi del primo foglio che si chiama RIEP mettere la protezione anche qui e escludere le cele da C2:C5;J3:J14;A32-A33-A43-A44-C7-D2-A19
L’ultimo foglio si chiama “codici servizi” ma qui non bisogna agire.
Mi aiutate?
Grazie!
Codice sorgente - presumibilmente VB.NET |
[CODE]Sub NascondirigheVuote() 'nasconde righe e colonne Dim ff As Integer Dim rr As Integer For ff = 2 To 13 If Worksheets(ff).Name <> "Riep" Then Worksheets(ff).Select For rr = 57 To 14 Step -1 If Val(Range("A" & rr)) = 0 Then Rows(rr & ":" & rr).EntireRow.Hidden = True Range("K:L,P:AW").EntireColumn.Hidden = True Next rr End If Sheets(ff).Protect DrawingObjects:=True, Contents:=True, Scenarios:=True Next ff End Sub[/CODE]
|
|