Behaviour of headers

A

AlfD

Hi!

I have a workbook which, inter alia, prints tables and charts.

The printing is done via VBA and, in the pagesetup routine, i
concatenates codes (&B &14) to get bold 14-point type with a variabl
(a title) read from a cell on the active worksheet.

So something like "&B &14" & Range("F2").value goes in the centr
header. (Sorry, but I can't bring myself to type center...).

All has been well until someone chose to put a value in F2 which bega
with a number, where previously F2 had always begun with an alph
character. (It was 2003 rather than Y4 2003)

Two things seem to have happened as a result:

1. The header didn't print.
2. In the case of a Windows NT installation, the print macro stoppe
(Error 1004), whereas in Windows XP the rest of the printing went o
unhindered. Both systems were using Excel2003.

Is this behaviour I should expect?

Obviously there are work-arounds, but it would be better to understan
and then remove the problem.

Any suggestions welcomed!

Al
 
D

Dave Peterson

I'd put an additional space in this string:

"&B &14 " & Range("F2").value

Then excel could tell the difference between the size of the font and the next
set of characters.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top