View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Programming header/footer strings with line feed

I am using Windows XP with Office 2003.

I have a VBA program in which I can enter a header or footer string in a
sheet and the program enters this string for me into the header or footer of
hundreds of files that are formatted automatically. For example a set up
string might look like:

&"Arial,Bold"&10&UACCOUNT SUMMARY CONTINUED:

The above would be "Arial", bold, 10-points, underlined. This works great.

The only thing is, I need to be able to insert a return or a line feed at
the beginning and/or end of the string and I can't seem to get it to work.
For example, I tried variations of the following without success:

&Chr(10) &"Arial,Bold"&10&UACCOUNT SUMMARY CONTINUED:
&"Chr(13)" &"Arial,Bold"&10&UACCOUNT SUMMARY CONTINUED:

Could someone PLEASE help me out on this and post back a correction to make
it work?

Thanks so much in advance.