LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default change event

Hi Group,

I am new to programming so please bear with me
I am trying to force the contents of cell A1 to the center header field
everytime the cell is changed. I have written the code to place the contents
into the header but need help with the change event. I am getting a syntax
error.
TIA for the help and any advise to improve my skills
Header code
Sub HeaderFromCell()
ActiveSheet.PageSetup.CenterHeader = _
Format(Worksheets("Action List").Range("A2").Value)
End Sub
Change code
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells = (2, 1)Then HeaderFromCell ()
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell value change to trigger macro (worksheet change event?) Neil Goldwasser Excel Programming 4 January 10th 06 01:55 PM
Change event and calculate event Antje Excel Programming 1 March 29th 05 09:03 PM
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM
change event/after update event?? scrabtree23[_2_] Excel Programming 1 October 20th 03 07:09 PM


All times are GMT +1. The time now is 12:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"