Selection.Copy ' Copiez la sélection dans le presse-papiers ' Création d'une nouvelle…
- User
Selection.Copy ' Copiez la sélection dans le presse-papiers
code' Création d'une nouvelle instance d'Excel Dim xlApp As Excel.Application Dim xlWb As Excel.Workbook Dim xlWs As Excel.Worksheet Set xlApp = New Excel.Application Set xlWb = xlApp.Workbooks.Add Set xlWs = xlWb.ActiveSheet ' Coller les formes dans la feuille Excel xlWs.Paste Destination:=xlWs.Range("C5") ' Coller les form ' Ajuster la taille des colonnes et des lignes pour afficher les formes xlWs.Columns.AutoFit xlWs.Rows.AutoFit ' Afficher Excel xlApp.Visible = True ' Ajout de l'en-tête xlWs.Range("A1").Select xlWs.Range("A1:T1").Merge With xlWs.Range("A1").Font .Name = "Calibri" .Size = 22 .Bold = True .Color = RGB(255, 255, 255) ' Couleur blanche End With With xlWs.Range("A1").Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorAccent6 .TintAndShade = 0.5 .PatternTintAndShade = 0 End With With xlWs.Range("A1").Borders .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With xlWs.Range("A1").Value = "JURIDIQUE - ORGANIGRAMME | " & Format(Now(), "dd/mm/yyyy") xlWs.Range("A1").HorizontalAlignment = xlCenter xlWs.Rows("1:2").RowHeight = 50 ' Ajustez la hauteur en fonction de vos besoins ' Sauvegarde du fichier Excel Dim objSaveBox As FileDialog Set objSaveBox = xlApp.FileDialog(msoFileDialogSaveAs) With objSaveBox .InitialFileName = "Mes Documents\Mon Organigramme.xlsx" .Show .Execute End With ' Fermeture d'Excel 'xlWb.Close False 'xlApp.Quit ' Libérez les objets Set xlWs = Nothing Set xlWb = Nothing Set xlApp = Nothing Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.