G
Guest
I need to set a custom header with the filename and sheetname - easy enough,
I can do that with...
ActiveSheet.PageSetup .LeftHeader = "&F &A"
....but that appends .xls onto the filename, which I don't want.
Elsewhere in the workbook I have to work out the filename minus the .xls, so
I figured I'd use the value from this procedure (fname - string variable) in
the custom header dialog
ActiveSheet.PageSetup .LeftHeader = fname & " " & "&A"
That works ok, but I want the text to be 18pt. I recorded a macro to work
out how to change the font size in the custom header and it's done by
prefacing the &A with &18. Problem is, I can't put &18 in front of the
variable fname....
None of the following return the right result:
ActiveSheet.PageSetup .LeftHeader = "&18"fname & " " & "&18&A" (--expects
end of the procedure)
ActiveSheet.PageSetup .LeftHeader ="&18 fname" & " " & "&18&A" (--types
fname instead of the actual value of the variable)
Can somebody help me with this please? Am I going about it in totally the
wrong way? Any and all suggestions greatly appreciated
I can do that with...
ActiveSheet.PageSetup .LeftHeader = "&F &A"
....but that appends .xls onto the filename, which I don't want.
Elsewhere in the workbook I have to work out the filename minus the .xls, so
I figured I'd use the value from this procedure (fname - string variable) in
the custom header dialog
ActiveSheet.PageSetup .LeftHeader = fname & " " & "&A"
That works ok, but I want the text to be 18pt. I recorded a macro to work
out how to change the font size in the custom header and it's done by
prefacing the &A with &18. Problem is, I can't put &18 in front of the
variable fname....
None of the following return the right result:
ActiveSheet.PageSetup .LeftHeader = "&18"fname & " " & "&18&A" (--expects
end of the procedure)
ActiveSheet.PageSetup .LeftHeader ="&18 fname" & " " & "&18&A" (--types
fname instead of the actual value of the variable)
Can somebody help me with this please? Am I going about it in totally the
wrong way? Any and all suggestions greatly appreciated
