Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a userform that is used to adjust certain print parameters. One of the parameters is the header which is picked up from Textbox1. Textbox1 is preloaded on userform initialization with the following string:
str = Sheet12.Range("ship").Value & Chr(10) & "Total Cost" & Chr(10) & Sheet12.Range("clin").Value TextBox1.Value = str The string is entered into the header with ActiveSheet.PageSetup.CenterHeader = TextBox1.Value with the intent being the user is allowed to edit the header string from the form and the changes will be reflected in the header. My problem is that the header becomes double spaced. The double spacing shows up whether or not the user makes any changes to the textbox. Textbox1 is set to multi-line and looks fine with the three lines and appropriate line breaks. It seems like the chr(10) triggers a line break in the textbox, but stays in there somehow and causes a double space when the textbox.value is made into the centerheader. How can I stop that? That is the same string that works fine when it is put in the centerheader, without passing through the userform textbox. Thanks Ken PS sorry about the premature sending of the earlier incomplete vesion of this. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
textbox string to header causes double spacing | Excel Programming | |||
Double spacing | Excel Discussion (Misc queries) | |||
double line spacing using excel 2000 | Excel Discussion (Misc queries) | |||
double spacing a column | Excel Discussion (Misc queries) | |||
Unwanted Double Quotes produced by Excel | Excel Programming |