Bonjour,
J'ai créé une macro pour récupérer du texte qui se trouve dans des cellules de mon fichier xls et l'utiliser pour créer mon en-tête.
Mon texte se trouve dans 4 cellules et se retrouve dans 3 lignes de mon en-tête.
Le problème est que la première ligne de mon en-tête est coupée.
Avez-vous une idée de ce qui pourrait provoquez cela ?
Merci d'avance
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38 Sub Header_Footer() Sheets("Macros").Select Dim StudName As String Dim CustName As String Dim SegName As String Dim TitleName As String StudName = Range("B" & 14).Value CustName = Range("B" & 15).Value SegName = Range("B" & 16).Value TitleName = Range("B" & 17).Value Dim x As Byte For x = 1 To Sheets.Count With Sheets(x).PageSetup .CenterHeader = "&""Tahoma,Regular" & "&8&K002060" & StudName & Chr(10) & _ "&""Tahoma,Bold""&8&K002060" & CustName & " - " & SegName & Chr(10) & _ "&""Tahoma,Regular""&8&K002060Actieplan" .LeftFooter = "&""Tahoma,Regular""&8&K002060ICMA International" .CenterHorizontally = True .Orientation = xlLandscape .LeftMargin = Application.InchesToPoints(0.748031496062992) .RightMargin = Application.InchesToPoints(0.748031496062992) .TopMargin = Application.InchesToPoints(0.78740157480315) .BottomMargin = Application.InchesToPoints(0.590551181102362) .HeaderMargin = Application.InchesToPoints(0.31496062992126) .FooterMargin = Application.InchesToPoints(0.31496062992126) .CenterHorizontally = True .Orientation = xlLandscape .PaperSize = xlPaperA4 End With Next x End Sub
Anthony
Partager