How to apply different headers or footers on each page on an Excel ... The following VBA code can help you to apply different headers or footers on each page of a worksheet. Please do as follows. 1. Press the Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Application s window. 2. In the Microsoft Visual Basic for Applications window, click Insert > Module.