ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dynamic Headers via VBA - Probably Simple Answer????? (https://www.excelbanter.com/excel-programming/364203-dynamic-headers-via-vba-probably-simple-answer.html)

mvyvoda

Dynamic Headers via VBA - Probably Simple Answer?????
 
How would I print a Header via VBA that would change based on the following
array?:

OSRList = Array("BS", "CK", "HS", "IT", "JD", "JW", "KC", "KF", "MG", "MM",
"SM", "TS", "VD")

The code I am using looks like this:
..CenterHeader = "&""Garamond,Regular""&36Account List"

Currently it only prints "Account List" on the page. I need it to print
dynamically. For example, depending on whom I want to print, the header's
would be
"BS Account List," or
"KF Account List," etc.?

Even better, how can I replace "BS" with "Brian Sommers" or "KF" to "Kevin
Franklin?" I would need a reference array... Not sure where to go from there.

Thanks for your time and energy,
-m


All times are GMT +1. The time now is 09:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com