I have a spreadsheet that seems to work properly, except for one niggling thing…. (ain’t that always the way?)
The sheet runs through a number of possible scenarios, and it is convenient to identify the active scenarios in the footer. I have included code in the VBA
For i = 1 To MAXSCENARIOS If USESCENARIOS(i) = True Then stLFooter = stLFooter & ": " & ScenNames(i) Next With ActiveSheet.PageSetup .LeftFooter = Format(Now, "Mmmm d, 'yy") & " - " & "&T" & Chr(13) & stLFooter End With
This worked fine when I had three or four active scenarios – however, it crashes with the message that it “cannot set the LeftFooter property of the PageSetup object” when I have more scenarios active. Footers have a maximum length of 255 characters – but checking on the length of stLFooter in break mode returns a length of ~104 characters or so. Even after appending the date and time information it should still be able to insert it into the footer…
Am I missing something?
Thanks for any help anyone can provide.