J'ai deux images superposées (1er plan/ arriére plan) et en fonction d'une
réponse j'affiche l'une ou l'autre. Mais comme je protège ma feuille, la
macro ne trouve plus le nom de mon image. Je tourne en rond.
Excel ne veut pas / ou ignore les protect/unprotect.
Autre solution?
Ci-dessous une partie du code:
If Cells(4, 4) <> 1 Then
ActiveSheet.Unprotect Password:="999", DrawingObjects:=True,
Contents:=True, Scenarios:=True
ActiveSheet.Shapes("Chris_o").Select
Selection.ShapeRange.ZOrder msoBringToBack
ActiveSheet.Shapes("Chris_s").Select
Selection.ShapeRange.ZOrder msoBringToFront
ActiveSheet.Protect Password:="999", DrawingObjects:=True,
Contents:=True, Scenarios:=True
i = MsgBox("If faut donner la bonne réponse", vbOKOnly,
"Cherchez encore")
Else
ActiveSheet.Protect Password:="999", DrawingObjects:=True,
Contents:=True, Scenarios:=True
ActiveSheet.Shapes("Chris_s").Select
Selection.ShapeRange.ZOrder msoBringToBack
ActiveSheet.Shapes("Chris_o").Select
Selection.ShapeRange.ZOrder msoBringToFront
ActiveSheet.Protect Password:="999", DrawingObjects:=True,
Contents:=True, Scenarios:=True
End If
--
C''était si facile avant...
'ainsi tu n'as plus besoin de déprotèger , reprotèger
lSteph
"BB" a écrit dans le message de news:
J'ai deux images superposées (1er plan/ arriére plan) et en fonction d'une réponse j'affiche l'une ou l'autre. Mais comme je protège ma feuille, la macro ne trouve plus le nom de mon image. Je tourne en rond. Excel ne veut pas / ou ignore les protect/unprotect. Autre solution? Ci-dessous une partie du code: If Cells(4, 4) <> 1 Then ActiveSheet.Unprotect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True ActiveSheet.Shapes("Chris_o").Select Selection.ShapeRange.ZOrder msoBringToBack ActiveSheet.Shapes("Chris_s").Select Selection.ShapeRange.ZOrder msoBringToFront ActiveSheet.Protect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True i = MsgBox("If faut donner la bonne réponse", vbOKOnly, "Cherchez encore")
Else ActiveSheet.Protect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True ActiveSheet.Shapes("Chris_s").Select Selection.ShapeRange.ZOrder msoBringToBack ActiveSheet.Shapes("Chris_o").Select Selection.ShapeRange.ZOrder msoBringToFront ActiveSheet.Protect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True End If -- C''était si facile avant...
Bonsoir,
As-tu essayé userinterfaceonly , par macro, de ne protèger que la partie
utilisateur et laisser agir le code?
'ainsi tu n'as plus besoin de déprotèger , reprotèger
lSteph
"BB" <BB@discussions.microsoft.com> a écrit dans le message de news:
3463BE59-7557-4E64-8AA0-E0981B9AE3B2@microsoft.com...
J'ai deux images superposées (1er plan/ arriére plan) et en fonction d'une
réponse j'affiche l'une ou l'autre. Mais comme je protège ma feuille, la
macro ne trouve plus le nom de mon image. Je tourne en rond.
Excel ne veut pas / ou ignore les protect/unprotect.
Autre solution?
Ci-dessous une partie du code:
If Cells(4, 4) <> 1 Then
ActiveSheet.Unprotect Password:="999",
DrawingObjects:=True,
Contents:=True, Scenarios:=True
ActiveSheet.Shapes("Chris_o").Select
Selection.ShapeRange.ZOrder msoBringToBack
ActiveSheet.Shapes("Chris_s").Select
Selection.ShapeRange.ZOrder msoBringToFront
ActiveSheet.Protect Password:="999", DrawingObjects:=True,
Contents:=True, Scenarios:=True
i = MsgBox("If faut donner la bonne réponse", vbOKOnly,
"Cherchez encore")
Else
ActiveSheet.Protect Password:="999", DrawingObjects:=True,
Contents:=True, Scenarios:=True
ActiveSheet.Shapes("Chris_s").Select
Selection.ShapeRange.ZOrder msoBringToBack
ActiveSheet.Shapes("Chris_o").Select
Selection.ShapeRange.ZOrder msoBringToFront
ActiveSheet.Protect Password:="999", DrawingObjects:=True,
Contents:=True, Scenarios:=True
End If
--
C''était si facile avant...
'ainsi tu n'as plus besoin de déprotèger , reprotèger
lSteph
"BB" a écrit dans le message de news:
J'ai deux images superposées (1er plan/ arriére plan) et en fonction d'une réponse j'affiche l'une ou l'autre. Mais comme je protège ma feuille, la macro ne trouve plus le nom de mon image. Je tourne en rond. Excel ne veut pas / ou ignore les protect/unprotect. Autre solution? Ci-dessous une partie du code: If Cells(4, 4) <> 1 Then ActiveSheet.Unprotect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True ActiveSheet.Shapes("Chris_o").Select Selection.ShapeRange.ZOrder msoBringToBack ActiveSheet.Shapes("Chris_s").Select Selection.ShapeRange.ZOrder msoBringToFront ActiveSheet.Protect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True i = MsgBox("If faut donner la bonne réponse", vbOKOnly, "Cherchez encore")
Else ActiveSheet.Protect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True ActiveSheet.Shapes("Chris_s").Select Selection.ShapeRange.ZOrder msoBringToBack ActiveSheet.Shapes("Chris_o").Select Selection.ShapeRange.ZOrder msoBringToFront ActiveSheet.Protect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True End If -- C''était si facile avant...
BB
Merci ISteph, J'ai avancé d'un grand pas. J'ai d'autres soucis mais je ferai une question séparée. @+
-- C''''était si facile avant...
"lSteph" wrote:
Bonsoir, As-tu essayé userinterfaceonly , par macro, de ne protèger que la partie utilisateur et laisser agir le code?
'ainsi tu n'as plus besoin de déprotèger , reprotèger
lSteph
"BB" a écrit dans le message de news:
J'ai deux images superposées (1er plan/ arriére plan) et en fonction d'une réponse j'affiche l'une ou l'autre. Mais comme je protège ma feuille, la macro ne trouve plus le nom de mon image. Je tourne en rond. Excel ne veut pas / ou ignore les protect/unprotect. Autre solution? Ci-dessous une partie du code: If Cells(4, 4) <> 1 Then ActiveSheet.Unprotect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True ActiveSheet.Shapes("Chris_o").Select Selection.ShapeRange.ZOrder msoBringToBack ActiveSheet.Shapes("Chris_s").Select Selection.ShapeRange.ZOrder msoBringToFront ActiveSheet.Protect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True i = MsgBox("If faut donner la bonne réponse", vbOKOnly, "Cherchez encore")
Else ActiveSheet.Protect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True ActiveSheet.Shapes("Chris_s").Select Selection.ShapeRange.ZOrder msoBringToBack ActiveSheet.Shapes("Chris_o").Select Selection.ShapeRange.ZOrder msoBringToFront ActiveSheet.Protect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True End If -- C''était si facile avant...
Merci ISteph,
J'ai avancé d'un grand pas. J'ai d'autres soucis mais je ferai une question
séparée.
@+
--
C''''était si facile avant...
"lSteph" wrote:
Bonsoir,
As-tu essayé userinterfaceonly , par macro, de ne protèger que la partie
utilisateur et laisser agir le code?
'ainsi tu n'as plus besoin de déprotèger , reprotèger
lSteph
"BB" <BB@discussions.microsoft.com> a écrit dans le message de news:
3463BE59-7557-4E64-8AA0-E0981B9AE3B2@microsoft.com...
J'ai deux images superposées (1er plan/ arriére plan) et en fonction d'une
réponse j'affiche l'une ou l'autre. Mais comme je protège ma feuille, la
macro ne trouve plus le nom de mon image. Je tourne en rond.
Excel ne veut pas / ou ignore les protect/unprotect.
Autre solution?
Ci-dessous une partie du code:
If Cells(4, 4) <> 1 Then
ActiveSheet.Unprotect Password:="999",
DrawingObjects:=True,
Contents:=True, Scenarios:=True
ActiveSheet.Shapes("Chris_o").Select
Selection.ShapeRange.ZOrder msoBringToBack
ActiveSheet.Shapes("Chris_s").Select
Selection.ShapeRange.ZOrder msoBringToFront
ActiveSheet.Protect Password:="999", DrawingObjects:=True,
Contents:=True, Scenarios:=True
i = MsgBox("If faut donner la bonne réponse", vbOKOnly,
"Cherchez encore")
Else
ActiveSheet.Protect Password:="999", DrawingObjects:=True,
Contents:=True, Scenarios:=True
ActiveSheet.Shapes("Chris_s").Select
Selection.ShapeRange.ZOrder msoBringToBack
ActiveSheet.Shapes("Chris_o").Select
Selection.ShapeRange.ZOrder msoBringToFront
ActiveSheet.Protect Password:="999", DrawingObjects:=True,
Contents:=True, Scenarios:=True
End If
--
C''était si facile avant...
'ainsi tu n'as plus besoin de déprotèger , reprotèger
lSteph
"BB" a écrit dans le message de news:
J'ai deux images superposées (1er plan/ arriére plan) et en fonction d'une réponse j'affiche l'une ou l'autre. Mais comme je protège ma feuille, la macro ne trouve plus le nom de mon image. Je tourne en rond. Excel ne veut pas / ou ignore les protect/unprotect. Autre solution? Ci-dessous une partie du code: If Cells(4, 4) <> 1 Then ActiveSheet.Unprotect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True ActiveSheet.Shapes("Chris_o").Select Selection.ShapeRange.ZOrder msoBringToBack ActiveSheet.Shapes("Chris_s").Select Selection.ShapeRange.ZOrder msoBringToFront ActiveSheet.Protect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True i = MsgBox("If faut donner la bonne réponse", vbOKOnly, "Cherchez encore")
Else ActiveSheet.Protect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True ActiveSheet.Shapes("Chris_s").Select Selection.ShapeRange.ZOrder msoBringToBack ActiveSheet.Shapes("Chris_o").Select Selection.ShapeRange.ZOrder msoBringToFront ActiveSheet.Protect Password:="999", DrawingObjects:=True, Contents:=True, Scenarios:=True End If -- C''était si facile avant...