How do I eliminate extra lines from this userform?

spurtniq

New Member
Joined
Nov 15, 2003
Messages
27
Used this code:

Unless I'm missing the point of the question, this should do the job:

Private Sub CommandButton1_Click()
If Len(TextBox1.Text) > 0 Then ActiveSheet.PageSetup.LeftHeader = TextBox1.Text
If Len(TextBox2.Text) > 0 Then ActiveSheet.PageSetup.CenterHeader = TextBox2.Text
If Len(TextBox3.Text) > 0 Then ActiveSheet.PageSetup.RightHeader = TextBox3.Text
End Sub
_________________
Tom Urtis

from this earlier post:

http://www.mrexcel.com/board2/viewtopic.php?t=65454

Setup a userform with three textboxes and an "ok" button.

Setup the textboxes to accept multi-line text entry and set Enter behavior
to "true".

That's it.

When I look at the header, I ger an extra line of space in between each line
on the header.

So three lines of text takes up six lines of header.

How do I fix this?

Thanx.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,203,329
Messages
6,054,756
Members
444,748
Latest member
knowak87

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top