General Ledger
Active Member
- Joined
- Dec 31, 2007
- Messages
- 460
Dear All,
I am using Excel 2003 with Windows XP on a network. I keep getting errors with some code. In a sheet, I have:
Sub GetUser()
Range("Created").Value = Application.WorksheetFunction(Now())
Range("Author").Value = Application.UserName
End Sub
The code for the Author works perfectly. The code for Created where it is suppose to get todays date, I get an error:
Run-Time error '438':
Object does not support this property or method
When I execute the code in break mode (run line by line), I hover my curosr over the Now element and do see it does contain todays date.
Does it make a difference if this code is in the sheet or in a module? I get the same errror whether the code is in either place.
What makes this worse is I swear it worked a week ago but not now. I have made many changes since. Weird but it must have been something I did.
Thanks,
GL
I am using Excel 2003 with Windows XP on a network. I keep getting errors with some code. In a sheet, I have:
Sub GetUser()
Range("Created").Value = Application.WorksheetFunction(Now())
Range("Author").Value = Application.UserName
End Sub
The code for the Author works perfectly. The code for Created where it is suppose to get todays date, I get an error:
Run-Time error '438':
Object does not support this property or method
When I execute the code in break mode (run line by line), I hover my curosr over the Now element and do see it does contain todays date.
Does it make a difference if this code is in the sheet or in a module? I get the same errror whether the code is in either place.
What makes this worse is I swear it worked a week ago but not now. I have made many changes since. Weird but it must have been something I did.
Thanks,
GL