I have two lines of code that seems extremely easy, but excel keeps giving me this Compile error telling me that object is required?
So basically I want to get the current time, and replace the spaces with underscores so I can use this string as the name of my log fime.
Dim name As String
'EXCEL GIVE ME compile error: object required
name = Replace(FormatDateTime(Now, DateFormat.LONGTIME), " ", "_")
What's wrong?!!