Workbook_BeforePrint event not working
<p>I want to dynamically set some data to the header (and/or footer) of a sheet.</p>

<p>From several forums I found numerous examples showing how to do that, and they all seem pretty easy to understand without any difficulty.<br>
So I applied what I read to a simple try like this:</p>

<pre><code>Private Sub Workbook_BeforePrint(Cancel As Boolean)
    ActiveSheet.PageSetup.CenterFooter = Range("A1")
End Sub
</code></pre>

<p>But it merely don't work: nothing appears in my sheet preview.</p>

<p>BTW the only ambiguous point in documentations was about the expression of the data to use, so I also tried replacing <code>Range("A1")</code> by <code>Range("A1").Text</code>, then by <code>Range("A1").Value</code>, also without success.</p>

<p>I suppose I'm missing some simple point...</p>