jensslofstra
New Member
- Joined
- Sep 13, 2016
- Messages
- 9
Hi everyone,
I've been trying the whole day but can't figure it out.
I need to align words in two rows. (It's used in an automatic header.)
What I've stumbled upon was that adding spaces doesn't automaticly mean words align perfectly.
What is want to accomplish is something like this.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Customer:[/TD]
[TD]Mister John Doe[/TD]
[/TR]
[TR]
[TD]Company:[/TD]
[TD]John's Enterprice[/TD]
[/TR]
</tbody>[/TABLE]
I've tried this code already and also used Chr(9) and vbTab instead of spaces.
I've been trying the whole day but can't figure it out.
I need to align words in two rows. (It's used in an automatic header.)
What I've stumbled upon was that adding spaces doesn't automaticly mean words align perfectly.
What is want to accomplish is something like this.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Customer:[/TD]
[TD]Mister John Doe[/TD]
[/TR]
[TR]
[TD]Company:[/TD]
[TD]John's Enterprice[/TD]
[/TR]
</tbody>[/TABLE]
I've tried this code already and also used Chr(9) and vbTab instead of spaces.
Code:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Worksheets("Offerte").PageSetup
.LeftHeader = Worksheets("Sheet1").Range("B3") & Space(16) & Worksheets("Sheet1").Range("C3") & Chr(10) & Worksheets("Sheet1").Range("B4") & Space(14) & Worksheets("Sheet1").Range("C4")
End With
End Sub