samsilverman
Board Regular
- Joined
- Nov 9, 2009
- Messages
- 176
I am using Excel 2007
I have 3 worksheets I need this code fixed for:
ACCOUNT, TEST AREAS and BILLING
I have this code in my first worksheet:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveSheet.Name = "ACCOUNT" Then
ActiveSheet.PageSetup.CenterHeader = "&""Calibri""&B&18ACCOUNT " & Chr(10) & Sheet1.Range("C5")
End If
End Sub
The code works now, but it recalculates the header anytime I click in the worksheet. Two questions:
The first action a user completes is to filter a range (N31:Z300). This changes several cell values in the ACCOUNT worksheet. Is it possible to use this filtering as an event in order to change the headers in all three worksheets above? If so, can you tell me how in very simple terms?
If that won't work, is it possible to narrow down the "SelectionChange" Event to a one cell range or button. The idea would be to have the user click on the cell or button after filtering, thereby updating the three worksheet headers as well. If so, can you tell me how in very simple terms?
Thanks.
I have 3 worksheets I need this code fixed for:
ACCOUNT, TEST AREAS and BILLING
I have this code in my first worksheet:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveSheet.Name = "ACCOUNT" Then
ActiveSheet.PageSetup.CenterHeader = "&""Calibri""&B&18ACCOUNT " & Chr(10) & Sheet1.Range("C5")
End If
End Sub
The code works now, but it recalculates the header anytime I click in the worksheet. Two questions:
The first action a user completes is to filter a range (N31:Z300). This changes several cell values in the ACCOUNT worksheet. Is it possible to use this filtering as an event in order to change the headers in all three worksheets above? If so, can you tell me how in very simple terms?
If that won't work, is it possible to narrow down the "SelectionChange" Event to a one cell range or button. The idea would be to have the user click on the cell or button after filtering, thereby updating the three worksheet headers as well. If so, can you tell me how in very simple terms?
Thanks.
Last edited: