View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
doki60 doki60 is offline
external usenet poster
 
Posts: 4
Default VB Script not working in Excel 2010

Hello,

I have a VB script that I was running for all of my worksheets in Excel 2007
to
put a date in the header of all worksheets in a workbook before printing.
When
I upgraded to 2010 it no longer worked. I've gone through the Trust Center
and
enabled macros and clicked trust access to VBA. The script being run is as
follows:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.RightHeader = Range("'revisiondate'!b2").Value
End Sub

Any ideas on how to get this to run again?

Thanks