Thread: [Solved] Timestamp Sub failing
View Single Post
 
Old 04-13-2017, 07:11 AM
webba0264 webba0264 is offline Windows 8 Office 2007
Novice
 
Join Date: Jun 2016
Posts: 9
webba0264 is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
The reason you're getting such errors is that you have 'Option Explicit' set (good) but you haven't declared the variables before using them (bad) - which 'Option Explicit' requires. If you check the debugger, you'll see that 'LastValue' causes the error. Nowhere have you declared LastValue and neither have you given it a value. At a guess, I'd say it should be a worksheet reference. Similarly, the same line refers to a range named 'TotalEnrolledLast' but that range doesn't exist in the workbook - and neither does 'TotalCompleteLast'.
Okay, that makes sense macropod. Now for the stupid question...

...how does one declare a value? Ex. "LastValue"

Someone helped me write this code, I am going to try and learn how to fix it.

Thank you MP
Reply With Quote