Using a named range in a header with VBA?
You need to enclose the name in quotes.
But if you want a total, shouldn't you sum it as well?
ActiveSheet.PageSetup.RightHeader = "Total: " &
Application.SUM(Range("DollarVal"))
--
HTH
RP
(remove nothere from the email address if mailing direct)
wrote in message
ups.com...
I'd like to apply a named range to headers in a file. I did a search
and found some syntax that is close, but still generating an error.
The named range is "DollarVal". The code I have is
ActiveSheet.PageSetup.RightHeader = "Total: " & Range(DollarVal)
Any thoughts? Thanks!
|