Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
3100 connectés 

  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  protection vba avec excel 2003

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

protection vba avec excel 2003

n°932727
francoisd2​5
Posté le 27-12-2004 à 21:20:22  profilanswer
 

j'avais écrit 2 s/prog en vba pour proteger (et déprotéger) toutes les feuilles d'un classeur excel. Ca fonctionnait bien sous excel 97 et 2000 mais ça ne fonctionne plus sous excel 2003!!! Quelqu'un a-t-il un remède à mon problème. Merci d'avance
 
Public Sub Protection()
réponse = InputBox("Entrer OUI ou NON", "Protection", "OUI" )
If réponse = "OUI" Then
For Each w In Application.ActiveWorkbook.Sheets
If w.Protect = False Then
w.Protect
End If
Next
End If
End Sub
 
Public Sub Déprotection()
réponse = InputBox("Entrer OUI ou NON", "Déprotection", "OUI" )
If réponse = "OUI" Then
For Each w In Application.ActiveWorkbook.Sheets
If w.Protect = True Then
w.Unprotect
End If
Next
End If
End Sub

mood
Publicité
Posté le 27-12-2004 à 21:20:22  profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  protection vba avec excel 2003

 

Sujets relatifs
[Excel] Changer les limites d'un graphiqueSortie en fichier Word ou excel
[Excel][VBA]Empêcher le changmt de mise en pageVBA EXCEL - copie de graphique
VBA EXCEL création liste de validation de données[VBA Excel] [Résolu] Problème de librairies de fonctions vba
excel cellule colonne vbs boucleProblème de renvoi d'une requète ms query dans Excel
Comment avoir accès à Excel avec les fonctions MsgBox?macro pour excel, parametrage auto de graphique
Plus de sujets relatifs à : protection vba avec excel 2003


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR