BookmarkSubscribeRSS Feed
kmcacattack
Calcite | Level 5

I have recently upgrade from SAS Add-in 5.1 to 7.1.  When I run my VBA code that calls a stored procedure with prompts, I get an error when defining the New SasPrompt (Run-time Error '-2148024894 (80070002)' Automation Error, The system cannot find the file specified.) The line in bold below is where the VBA code stops. 

 

Sub MoveSASFiles()
Dim sas As SASExcelAddIn
    Set sas = Application.COMAddIns.Item("SAS.ExcelAddIn").Object

Dim Prompts1 As SASPrompts
    Set Prompts1 = New SASPrompts
    Prompts1.Add "StartLib", "/sas_nas_allshr/PermData/"
    Prompts1.Add "DatasetMove", "Summary"
    sas.InsertStoredProcess "/selact/Move_to_AMO", Sheet1.Range("D11"), Prompts1
End Sub

This code worked fine in 5.1.  I aslo have the reference for the SAS Add-In 7.1 for Microsoft Office selected. 

When looking at the updates for 7.1, it looks like the Prompts controls may have changed. 

http://support.sas.com/documentation/cdl/en/whatsdiff/66129/HTML/default/viewer.htm#n01ephrd2zgp1qn1...

 

Any help with calling a stored procedure with prompts through VBA SAS Add-in 7.1 would be greatly appreciated.

Thank you, 

Kyle

 

 

2 REPLIES 2
smektalski
Calcite | Level 5

Any solution to this issue yet?

smektalski
Calcite | Level 5

In order to SAS Support the solution is to change:

Set Prompts1 = New SASPrompts

with

Set Prompts1 = sas.CreateSASPromptsObject

 

Works for me.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Discussion stats
  • 2 replies
  • 1830 views
  • 0 likes
  • 2 in conversation