Application.widht=100

Bonjour,

Est ce la bonne syntaxe pour une feuille sur mon portable avec Excel 2016, ça marche pour Excel 2013.

Private Sub Worksheet_Activate()

NomOrdi = Environ("computername")

If NomOrdi = "BUREAU" Then

Application.Width = 1900

Application.Height = 1050

Application.Left = 1

Application.Top = 1

End If

If NomOrdi = "PORTABLE" Then

' Application.Width = 1000

' Application.Height = 1050

' Application.Left = 1

'Application.Top = 1

End If

DisplayHorizontalScrollBar = True

DisplayVerticalScrollBar = True

[A1].Select

End Sub

Bonne journée.

Jean-Michel

Bonjour Jean-Michel,

En EXCEL 2016, syntaxiquement, le code VBA est correct pour modifier la taille de la fenêtre.

Peut-être juste ajouter "ActiveWindow." devant les ordres

DisplayHorizontalScrollBar = True
DisplayVerticalScrollBar = True

Toutefois, je ne peux assurer que les valeurs affectées correspondent bien à ce que tu cherches à obtenir.

Rechercher des sujets similaires à "application widht 100"