jo15765
Well-known Member
- Joined
- Sep 23, 2011
- Messages
- 591
I copied a worksheet that I use all the time on another laptop to a flash drive and copied it to a new pc. The VBA runs perfectly on the other pc but on this 2nd pc I get a VBA Compile error of Can't find Project Or Library on this line of code
And it is highlighting the word Date...Any ideas why it works on one PC and not on another?
Code:
.SaveAs Filename:="C:\" & "_" & VBA.Left(ActiveWorkbook.Name, VBA.InStrRev(.Name, ".") - 1) & "_" & VBA.Format(Date, "mmddyyyy") & ".xls"
And it is highlighting the word Date...Any ideas why it works on one PC and not on another?