LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Leftaligning text in right header

You could change the font size to something massive, like 72 point, which
makes the spaces you use cover more space.
Then after the spaces, return the font size to standard 10 point (or
whatever you're using).

"&48" & String(25, " ") & "&10Page"


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"PO" <po wrote in message ...
Hi

I'm extracting invoicedata from a database into a worksheet
I want to leftalign the pagenumber and invoicenumber in the right header

in
pagesetup of the worksheet. Each time the user retrieves the invoicedata I
use the following code to set the right header for the worksheet:

Sub SetHeader
...
with activesheet.pagesetup
.rightheader = "Page" & _
Chr(10) & "&P(&N)" & _
Chr(10) & "Invoicenr" & _
Chr(10) & strInvNr
end with
End sub

If I place the text in the right header, however, the text right aligns.
I've tried to place the text in the left header and use the string

function:

with activesheet.pagesetup
.leftheader = string(165, " ") & "Page" & _
string(165, " ") & Chr(10) & "&P(&N)" & _
string(165, " ") & Chr(10) & "Invoicenr" & _
string(165, " ") & Chr(10) & strInvNr
end with

This doesn't work since you only can place up to 254 characters in one
header.
I use Excel 2000.

Any ideas?

TIA
PO






 
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
Header Text Stephen Tamchin Excel Discussion (Misc queries) 1 May 20th 10 10:15 PM
Can't view Header Text Prancer3 New Users to Excel 2 January 10th 09 11:17 PM
Header Row Cell Text perplexed Excel Worksheet Functions 4 March 11th 06 08:37 PM
can you do vertical text in header row??? roger_home Excel Discussion (Misc queries) 3 February 25th 06 01:38 PM
Replace &F in header with text amthyst826 Excel Discussion (Misc queries) 7 October 31st 05 11:12 PM


All times are GMT +1. The time now is 06:54 AM.

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

About Us

"It's about Microsoft Excel"