nikki333
11-17-2018, 12:32 PM
Hi Folks
I'm trying to set the header/footer before printing. The issue only a minor one, but still annoying:
In the picture below, the left header has an indent of 1 character, which is the actual issue.
23218
In my code I define a string for the left header, which doesn't contain any blank spaces. However, when looking at the page setup for headers/footers, there's a preset list that shows my string with a leading space.
Any ideas how to get rid of this?
Below are the relevant lines of code:
strLeftHeader = "&B" & "My Company Name" & "&B" & vbLf & wbRüstplan.Name
ws.PageSetup.LeftHeader = "&L &""Calibri Light"" &09" & strLeftHeader
I'm trying to set the header/footer before printing. The issue only a minor one, but still annoying:
In the picture below, the left header has an indent of 1 character, which is the actual issue.
23218
In my code I define a string for the left header, which doesn't contain any blank spaces. However, when looking at the page setup for headers/footers, there's a preset list that shows my string with a leading space.
Any ideas how to get rid of this?
Below are the relevant lines of code:
strLeftHeader = "&B" & "My Company Name" & "&B" & vbLf & wbRüstplan.Name
ws.PageSetup.LeftHeader = "&L &""Calibri Light"" &09" & strLeftHeader