1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
'begin description
'Purpose: Delete value labels of all variables.sbs.
'Requirement: 	must have data in data editor
'end description

'Written by Raynald Levesque on 2004/06/08
'SPSS site: http://pages.infinit.net/rlevesqu/index.htm

Option Explicit

Sub Main
	Dim objSpssInfo As ISpssInfo
	Dim i As Integer, j As Integer
	Dim strCmd As String

	Set objSpssInfo = objSpssApp.SpssInfo
	With objSpssInfo
		For i = 0 To .NumVariables - 1
			If .NumberOfValueLabels(i) > 0 Then
				strCmd = strCmd & "VALUE LABELS " & .VariableAt(i) & "." & vbCrLf
			End If
		Next i
	End With
	objSpssApp.ExecuteCommands (strCmd, vbFalse)
	Set objSpssInfo = Nothing
End Sub