Header value in a variable

Last Edited By Krjb Donovan
Last Updated: Mar 05, 2014 09:39 PM GMT


I would like to place only the text of the Left Header in a variable. What it does is it places the text AND all the formatting. example: "&"Algerian,Bold"&26EWCE" What would be the code just to get the text (in this case "EWCE")

Dim LeftHeaderValue as String LeftHeaderValue = ActiveSheet.PageSetup.LeftHeader



There is no built in attribute/property that will give you just the text string that would be displayed in the printed page. You would have to write code to parse it out. That would be difficult I would think since it could be very different from what you show. (for what you show, you could use Instr to get the location of 26 and then add two to that and use the mid function - but I assume that is just an example.)


©2024 eLuminary LLC. All rights reserved.