Désactiver Edition cellule

Résolu
cs_karitoo Messages postés 11 Date d'inscription vendredi 9 février 2007 Statut Membre Dernière intervention 2 avril 2007 - 2 avril 2007 à 11:09
cs_karitoo Messages postés 11 Date d'inscription vendredi 9 février 2007 Statut Membre Dernière intervention 2 avril 2007 - 2 avril 2007 à 13:32
Bonjour,

je voudrais désactiver l'édition dans une cellule,
vous voyez quand on fait "F2" ou si on double click sue la cellule on arrive à écrire dans la cellule.

est ce que vous avez une idée comment faire ?

MERCI

4 réponses

cs_karitoo Messages postés 11 Date d'inscription vendredi 9 février 2007 Statut Membre Dernière intervention 2 avril 2007
2 avril 2007 à 13:32
ça y'est j'ai trouvé :

http://xlbysteph.free.fr/aideinformatique/news/protection_feuilles_batch.txt

<jkpieterse@compuserve.com>De: Jan Karel Pieterse
Objet: Re: Protecting worksheets by using Excel 97 VBA
Date : lundi 20 septembre 1999 07:57

Hi William,

Try this:

Option Explicit
Sub ProtectThemAll()
dim sFileList() As String
dim sDirect As String
dim sFileSpec As String
dim icounter As Integer
dim iFilecount As Integer
dim sSheet As Worksheet
sDirect = "c:\data" 'Change accordingly
sFileSpec = "t*.xls" 'Change accordingly
application.screenupdating = false

icounter = 1
redim sFileList(1) As String
sFileList(1) = Dir(sDirect & sFileSpec)
if sFileList(1) = "" then
msgbox ("Found no Files like " & sDirect & sFileSpec)
Exit Sub
end if

do
icounter = icounter + 1
redim preserve sFileList(icounter + 1) As String
sFileList(icounter) = Dir()
loop Until sFileList(icounter) = ""

iFilecount = icounter-1

for icounter = 1 to iFilecount
workbooks.Open filename:=sDirect & sFileList(icounter)
for each sSheet In activeworkbook.worksheets 'Assuming there
are only those 13 to be protected!
sSheet.Protect password:="yourpassword"<npspam@nospam.com>, DrawingObjects:=true,
contents:=true, Scenarios:=true
next sSheet
activeworkbook.Close savechanges:=true
next icounter
end Sub

--
Kind regards,

Jan Karel Pieterse
jkpieterse@zzzcompuservezzz.com
(remove all z's)

William SMITH wrote in article
<37e5b8ea@ruby.hknet.com>...
> Mr.tom Ogilvy,
>
> May I ask you a question regarding protecting worksheets in Excel 97. I
got
> 50 workbooks. each contains 13 worksheets. I would like to protect each
> worksheets with a same passwords. How could I write a Excel VBA to
execute
> this task.
>
> Thank you very much for your reply.
>
>
> Will Smith
>
>
>
3
drikce06 Messages postés 2236 Date d'inscription lundi 29 mai 2006 Statut Membre Dernière intervention 29 mai 2008 10
2 avril 2007 à 11:20
Salut, la premiere chose qui me vient à l'esprit serai de protéger cette cellule

 Drikce 06

Si la réponse vous convient: Réponse acceptée. Si la réponse vous convient pas:
0
cs_karitoo Messages postés 11 Date d'inscription vendredi 9 février 2007 Statut Membre Dernière intervention 2 avril 2007
2 avril 2007 à 11:28
Comment faire !!!
0
cs_karitoo Messages postés 11 Date d'inscription vendredi 9 février 2007 Statut Membre Dernière intervention 2 avril 2007
2 avril 2007 à 11:50
SOS !!!!!!!!!!!!!!!!
0
Rejoignez-nous