EXE macro lancement fichier

F

Fabien

Guest
Bonjour

J'ai écrit des macros sur chacune de mes feuilles qui fonctionne sans problème, mais je voudrais les lancer à l'ouverture du fichier.
J'ai trois feuilles "Saison" "Equipe" "Individuel"
J'ai donc écrit sur mon classeur, mes 3 macro de la façon suivante

MAIS SUR MA FEUILLE SAISON ELLE ZOOM MAIS PAS SUFFISAMMENT
JE NE COMPRENDS PAS POURQUOI???

Private Sub Workbook_Activate()
With Sheets("Saison")
Range("A1:M4").Select
ActiveWindow.Zoom = True
End With
With Sheets("Equipe")
Range("A1:M24").Select
ActiveWindow.Zoom = True
End With
With Sheets("Individuel")
Dim L As Long
L = WorksheetFunction.Match("BASBAS", .Columns("AE"), 0)
Range("A1:AE" & L).Select
ActiveWindow.Zoom = True
End With
End Sub

A+
 
R

Robert

Guest
Bonsoir Fabien, bonsoir le forum,

essaie comme ça :

Private Sub Workbook_Activate()
With Sheets("Saison")
.Select
. Range("A1:M4").Select
ActiveWindow.Zoom = True
End With
With Sheets("Equipe")
.Select
. Range("A1:M24").Select
ActiveWindow.Zoom = True
End With
With Sheets("Individuel")
.Select
Dim L As Long
L = WorksheetFunction.Match("BASBAS", .Columns("AE"), 0)
.Range("A1:AE" & L).Select
ActiveWindow.Zoom = True
End With
End Sub

À plus,

Robert
 

Discussions similaires

Réponses
7
Affichages
312