Complile Error with Date

D

dbl

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
 
B

Bob Phillips

Firstly, check if there are any missing references. In the VBIDE go to
Tools>References. Uncheck any MISSING items that are checked.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top