View Single Post
  #2  
Old 02-14-2006, 10:14 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,033
The variable type of a macro depends on how the value was assigned (it is stored in a Variant data type). You can check it like this:

Dim RelDate
RelDate = vbld_AllMacros.Item("MyMacro").Value

Builder.LogMessage "MyMacro value = '" & RelDate & "'"
Builder.LogMessage "MyMacro type = " & TypeName(RelDate)

It appears that in your case, it is a string with the value

01.12.2005

In the US English locale, the VBScript Year function is unable to parse a string in that format (it can handle a format like "01/12/2005"). You need to store or convert the date in a format that VBScript knows how to parse for your locale.
Reply With Quote