D
Dylan
I'm using the following code to enter text from a userform textbox into my
page header before printing. I have set both EnterKeyBehaviour and Multiline
= True. When I print there is a space between each line of text.
How do I remove the blank lines?
Private Sub btnTitle_Click()
Dim strTitle As String
strTitle = frmPageTitle.txtTitle.Value
ActiveSheet.PageSetup.PrintTitleRows = "$1:$1"
ActiveSheet.PageSetup.CenterHeader = "&""Arial,Bold""&14 " & strTitle _
'& Chr(10) & (Date) & " " & (Time)
ActiveSheet.PageSetup.RightHeaderPicture.Filename = _
"H:\SWS Logo sm.jpg"
ActiveSheet.PageSetup.LeftHeader = "&""Arial,Bold""&14&D"
'Print Sheet
' ActiveWindow.SelectedSheets.PrintOut Copies:=1
frmPageTitle.Hide
End Sub
page header before printing. I have set both EnterKeyBehaviour and Multiline
= True. When I print there is a space between each line of text.
How do I remove the blank lines?
Private Sub btnTitle_Click()
Dim strTitle As String
strTitle = frmPageTitle.txtTitle.Value
ActiveSheet.PageSetup.PrintTitleRows = "$1:$1"
ActiveSheet.PageSetup.CenterHeader = "&""Arial,Bold""&14 " & strTitle _
'& Chr(10) & (Date) & " " & (Time)
ActiveSheet.PageSetup.RightHeaderPicture.Filename = _
"H:\SWS Logo sm.jpg"
ActiveSheet.PageSetup.LeftHeader = "&""Arial,Bold""&14&D"
'Print Sheet
' ActiveWindow.SelectedSheets.PrintOut Copies:=1
frmPageTitle.Hide
End Sub