简体   繁体   中英

Running a SPSS-Syntax from excel using vba

I'm trying to run a SPSS-Syntax-command (as an example: "freq v1.") from an Excel-File using vba. This used to work, but somehow not anymore. I have no idea why, I didn't change anything. Here is the code:

text="freq v1."
Set objSpssApp = GetObject(, "Spss.Application")
Set objOutputDoc = objSpssApp.NewOutputDoc
objSpssApp.ExecuteCommands text, True

Has anyone an idea why this is not working anymore?

Thx a lot!

IIRC Spss.Application became Spss.Application16 some years ago. But you would require an SPSS license to use this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM