Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Altri Linguaggi - Inserire commenti con protezione foglio
Forum - Altri Linguaggi - Inserire commenti con protezione foglio

Avatar
trittico69 (Normal User)
Pro


Messaggi: 144
Iscritto: 02/04/2010

Segnala al moderatore
Postato alle 18:20
Sabato, 07/05/2011
È possibile modificare questo codice…. in modo che mette la protezione ai fogli, che già fa, ma che mi permetta di inserire i commenti alle celle di excel 2003

Codice sorgente - presumibilmente VB.NET

  1. Sub NascondirigheVuote()
  2.     Application.ScreenUpdating = False
  3.     Dim ff As Integer
  4.     Dim rr As Integer
  5.     Dim Ws As Worksheet
  6.    
  7.     For ff = 1 To ActiveWorkbook.Worksheets.Count
  8.         Worksheets(ff).Unprotect
  9.         If Worksheets(ff).Name <> "RIEP" Then
  10.             Worksheets(ff).Select
  11.             With Range("B:B,J12,M9,M10,O9,O12")
  12.                 .Locked = False
  13.                 .FormulaHidden = False
  14.             End With
  15.             For rr = 57 To 14 Step -1
  16.                 If Val(Range("A" & rr)) = 0 Then Rows(rr & ":" & rr).EntireRow.Hidden = True
  17.             Next rr
  18.             Range("K:L,P:AW").EntireColumn.Hidden = True
  19.         Else
  20.             With Worksheets("RIEP").Range("C1:C5,J3:J14,A32:A33,A43:A44,C7,D1:D2,A19")
  21.                 .Locked = False
  22.                 .FormulaHidden = False
  23.             End With
  24.         End If
  25.         Sheets(ff).Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
  26.     Next ff
  27.     Application.ScreenUpdating = True
  28. End Sub



PM Quote