LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hard return ttribble Excel Worksheet Functions 4 June 19th 07 04:33 AM
use a hard return in a text box clara Excel Programming 2 March 19th 07 07:19 PM
hard return alphadog47 New Users to Excel 2 February 26th 05 08:38 PM
Msgbox text hard return Jo[_6_] Excel Programming 2 August 5th 04 12:01 AM
Hard Return in large textbox Todd Huttenstine Excel Programming 2 July 12th 04 10:02 PM


All times are GMT +1. The time now is 08:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"