bonsoir
dns mon classeur j'ai se code à l'ouverture
Private Sub Workbook_BeforeClose(Cancel As Boolean)
remetmenu
End Sub
Private Sub Workbook_Open()
suprimenu
End Sub
la pas de probleme sa fonctionne
et sur une feuille j'ai un bouton pour sauvegarder le classeur avec se code
Private Sub CommandButton1_Click()
remetmenu
CommandButton1.Visible = False
CommandButton2.Visible = False
CommandButton3.Visible = False
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Application.Dialogs(xlDialogSaveAs).Show
Application.DisplayAlerts = False
CommandButton1.Visible = True
CommandButton2.Visible = True
CommandButton3.Visible = True
Rows("1:1").Select
Selection.Insert Shift:=xlDown
Selection.RowHeight = 36
ActiveSheet.Shapes("CommandButton1").Select
Selection.ShapeRange.IncrementLeft -0.75
Selection.ShapeRange.IncrementTop -36.75
ActiveSheet.Shapes("CommandButton2").Select
Selection.ShapeRange.IncrementLeft -1.5
Selection.ShapeRange.IncrementTop -33.75
ActiveSheet.Shapes("CommandButton3").Select
Selection.ShapeRange.IncrementLeft 0.75
Selection.ShapeRange.IncrementTop -33#
CommandButton1.Height = 33
CommandButton2.Height = 33
CommandButton3.Height = 33
Range("A1").Select
suprimenu
'Application.Quit
End Sub
tous fonctionne bien,mais le petit soucis c'est quand j'enregistre le classeur sous un autre nom,il enregistre aussi se code
Private Sub Workbook_BeforeClose(Cancel As Boolean)
remetmenu
End Sub
Private Sub Workbook_Open()
suprimenu
End Sub
donc quand j'ouvre le nouveau classeur je n'est plus de barre.
ma question est,comment sauvegarder mon classeur sans mettre les code si dessus
Merci
dns mon classeur j'ai se code à l'ouverture
Private Sub Workbook_BeforeClose(Cancel As Boolean)
remetmenu
End Sub
Private Sub Workbook_Open()
suprimenu
End Sub
la pas de probleme sa fonctionne
et sur une feuille j'ai un bouton pour sauvegarder le classeur avec se code
Private Sub CommandButton1_Click()
remetmenu
CommandButton1.Visible = False
CommandButton2.Visible = False
CommandButton3.Visible = False
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Application.Dialogs(xlDialogSaveAs).Show
Application.DisplayAlerts = False
CommandButton1.Visible = True
CommandButton2.Visible = True
CommandButton3.Visible = True
Rows("1:1").Select
Selection.Insert Shift:=xlDown
Selection.RowHeight = 36
ActiveSheet.Shapes("CommandButton1").Select
Selection.ShapeRange.IncrementLeft -0.75
Selection.ShapeRange.IncrementTop -36.75
ActiveSheet.Shapes("CommandButton2").Select
Selection.ShapeRange.IncrementLeft -1.5
Selection.ShapeRange.IncrementTop -33.75
ActiveSheet.Shapes("CommandButton3").Select
Selection.ShapeRange.IncrementLeft 0.75
Selection.ShapeRange.IncrementTop -33#
CommandButton1.Height = 33
CommandButton2.Height = 33
CommandButton3.Height = 33
Range("A1").Select
suprimenu
'Application.Quit
End Sub
tous fonctionne bien,mais le petit soucis c'est quand j'enregistre le classeur sous un autre nom,il enregistre aussi se code
Private Sub Workbook_BeforeClose(Cancel As Boolean)
remetmenu
End Sub
Private Sub Workbook_Open()
suprimenu
End Sub
donc quand j'ouvre le nouveau classeur je n'est plus de barre.
ma question est,comment sauvegarder mon classeur sans mettre les code si dessus
Merci