Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hard return in textbox for header text
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hard return | Excel Worksheet Functions | |||
use a hard return in a text box | Excel Programming | |||
hard return | New Users to Excel | |||
Msgbox text hard return | Excel Programming | |||
Hard Return in large textbox | Excel Programming |