1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
Option Explicit

Sub Main
	FREQUENCIES_Syntax	
End Sub

Sub FREQUENCIES_Syntax()
'Recode values using a loop
Dim  strDate As String

	Dim strCommand As String, strCst As String, count As Integer, intCst As Date
	For count=1 To 4
		Let strDate = " '" & DateAdd("yyyy",count,#1/1/2000#)&"'"
		strCommand = "ADD VALUE LABELS var1 " &count & strDate
		objSpssApp.ExecuteCommands strCommand, True
		strCommand = "execute."
		objSpssApp.ExecuteCommands strCommand, True
	Next count
End Sub