Date: Sun, 21 Sep 2003 22:43:00 +0200
Reply-To: boulsaien khaled <boulsaienkhaled@yahoo.fr>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: boulsaien khaled <boulsaienkhaled@yahoo.fr>
Subject: Question: To + invokedialogandexeutesyntax+bar
Content-Type: text/plain; charset=iso-8859-1
ASSALEM ALAIKOUM
HI, I am Khaled
-----------------------Question N° 1----------------------------------------------------------------------
'*******THis is a portion of my script (I want to make a Principal Component Analysis)
'*******(I write my problem in the script)
Dim objinfo As ISpssInfo
Set objinfo=objSpssApp.SpssInfo
Dim Tab(56) As String
Dim intNumVariables As Integer
Set objInfo = objSpssApp.SpssInfo
intNumVariables = objInfo.NumVariables
Dim i As Integer
For i = 0 To 55
Tab(i) = objInfo.VariableAt(i)
Next i
'********* I don't want to write Tab(10) Tab(1)........ Tab(38) that's why I tried to use the instuction below (I use "To") but
'********when I execute it it seems that this instruction is false so what must I do to solve this problem
Dim strCommand As String
strCommand = strCommand & "FACTOR /VARIABLES " & Tab(10) To Tab(38) & " /MISSING LISTWISE /ANALYSIS Tab(10) To Tab(38) /Print INITIAL EXTRACTION"
strCommand = strCommand & " /PLOT EIGEN ROTATION /CRITERIA MINEIGEN(1) ITERATE(25) /EXTRACTION PC /ROTATION NOROTATE /METHOD=CORRELATION ."
objSpssApp.ExecuteCommands strCommand, True
-------------------------------------------Question N°2-----------------------------------------------------
'********This is also a part of a great script what I want exactly is to go directedly
'******** to "graphs>line>simple>summaries of separate variables" I tried it in the script below
'********but it doesn't function
'********NB: I know that the instruction "" objDataDoc.InvokeDialogAndExecuteSyntax ("graphs>line", SpssWindowParent, True) ""
'********works correctly but what I want is to go even to "" simple>summaries of separate variables ""
filepath="C:\Documents and Settings\Kaled\Bureau\stage\Données\4éme\données.4éme.Sav"
Dim objDataDoc As ISpssDataDoc
Set objDataDoc = objSpssApp.OpenDataDoc (filepath)
objDataDoc.InvokeDialogAndExecuteSyntax ("graphs>line>simple>summaries of separate variables", SpssWindowParent, True)
'*********In the same context I want to pose another question: in my data sheet I have many variables (45 variables)
'*********what I want is when I execute """ objDataDoc.InvokeDialogAndExecuteSyntax ("graphs>line", SpssWindowParent, True)"""
'*********only some variables (21 variables) (not all the variable of my data sheet) will be present in dialog box and
'********* from these 21 variables I will make what I want
--------------------------------------------------Question N°3---------------------------------------------------
'***************This is my script I don't know why it doesn't work
'*************** I know that the problem is in """BAR(SIMPLE)=VALUE(" & strvariables(i) & ") BY adm.reg .""""
'***************although many trials to correct it but I couldn't solve the problem
Dim objInfo As ISpssInfo
Dim strVariables(19) As String
Dim intNumVariables As Integer
Set objInfo = objSpssApp.SpssInfo
intNumVariables = objInfo.NumVariables
Dim i As Integer
For i = 0 To 18
strVariables(i) = objInfo.VariableAt(i)
If i <> 0 Then
Dim strComman As String
strComman = strComman & "GRAPH /BAR(SIMPLE)=VALUE(" & strvariables(i) & ") BY adm.reg ."
objSpssApp.ExecuteCommands strComman, True
End If
Next i
---------------------------------
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Testez le nouveau Yahoo! Mail