Excel

cs_Jhio Messages postés 7 Date d'inscription jeudi 25 novembre 2004 Statut Membre Dernière intervention 17 mai 2006 - 7 avril 2006 à 17:17
michelxld Messages postés 402 Date d'inscription vendredi 6 août 2004 Statut Membre Dernière intervention 12 octobre 2008 - 7 avril 2006 à 19:39
je genere uun fichier excel a partir dune application vb.
je voudrais savoir comment changer l,'orientation de ma feuille (en paysage ).

etat.Workbooks.Add

ca c'est ce que je fais pour crééer ma feuille mais je ne trouve pas loption pour changer cette option
merci

1 réponse

michelxld Messages postés 402 Date d'inscription vendredi 6 août 2004 Statut Membre Dernière intervention 12 octobre 2008 32
7 avril 2006 à 19:39
bonsoir

tu peux tester cette synthaxe pour modifier l'orientation de la 1ere feuille du classeur créé

Private Sub Command1_Click()
Dim Etat As Excel.Application
Dim Wb As Excel.Workbook


Set Etat = CreateObject("Excel.Application")
Etat.Visible = True
Set Wb = Etat.Workbooks.Add
Wb.Sheets(1).PageSetup.Orientation = xlLandscape
End Sub

bon week end
michel
0
Rejoignez-nous