View Single Post
  #1   Report Post  
dbl
 
Posts: n/a
Default Complile Error with Date

Hi I get the following error message "Can't Find Project or Library" when I
run the following code:

Application.ScreenUpdating = False

ActiveWindow.WindowState = xlMinimized
Workbooks.Open(Filename:="T:\Car Hire\Car Hire
Invoice.xls").RunAutoMacros _
Which:=xlAutoOpen
ActiveWindow.WindowState = xlMinimized
Workbooks.Open Filename:="T:\Car Hire\InvoiceNosCarHire.xls"
Sheets("Sheet1").Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.Copy
ActiveWindow.WindowState = xlMinimized
Windows("Car Hire Invoice.xls").Activate
ActiveWindow.WindowState = xlMaximized
Sheets("Invoice").Select
Range("K6").Select
ActiveSheet.Paste
Range("K7").Select
ActiveCell.FormulaR1C1 = "=Today()"
Range("K7") = Date

This is only part of the code.

It always stops on "Range("K7") = Date" on the word Date. If you delete this
line of code it runs fine to this point.

This run fine on my old computer put since I have upgrade to a new computer
using the same software Win XP Pro and Office 2003 Pro (both upgrades from
Win 2000 and Office 97 Pro) the code will not run past the word "Date"

Any help would be very much appreciated.

Bob