View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone[_2_] Jim Cone[_2_] is offline
external usenet poster
 
Posts: 1,549
Default VB Script not working in Excel 2010

What does "no longer worked" mean? Do you get an error message?
Did it function, in xl2007, in every workbook or just in a particular workbook?
Have you changed anything in the workbook?
In what module is the code installed?
What is "'revisiondate'!b2" ?
--
Jim Cone
Portland, Oregon USA
http://www.mediafire.com/PrimitiveSoftware
(Extras for Excel add-in: convenience built-in)



"doki60"
wrote in message
...
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