BookmarkSubscribeRSS Feed
DipeshGupta
Calcite | Level 5

I have facing some problem in defining SAS prompts in excel by using VBA-Excel addin.

 

My Program was running perfectly but recently it started showing an error of out of memory on the line where SAS prompt is defined.

 

Dim sas As SASExcelAddIn

Set sas = Application.COMAddIns.Item("Sas.ExcelAddIn").Object

Dim prompts As SASPrompts

Set prompts = New SASPrompts ( Showing an error of out of memory in this line)

 

Can't understand the problem.

 

Can anyone help me with this..??

3 REPLIES 3
CaseySmith
SAS Employee

This paper by @TimBeese might help if you haven't already seen:

http://support.sas.com/resources/papers/proceedings11/012-2011.pdf


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

DipeshGupta
Calcite | Level 5

Ya I have seen this and followed this PDF right from the starting but facing some problem on the line

 

"Set prompts = New SasPrompts"

 

The Code is working perfectly on my PC but whenever I run the Excel-VBA program on someone's else PC it shows me an error on the line "Set prompts = New SasPrompts" 

The Error is "Activex can't create object"

 

I have made sure that all references are added which were added in My PC.

 

I have repaired the office application in the second PC.

 

I have also Reinstalled the office application.

 

But the error still persists.

 

In summary the program is working only on My PC and can't understand why so.

 

can you please guide me how to solve the issue because maybe that can solve the problem of Out of Memory also.

 

I have even tried a small code in the 2nd PC i.e.

 

Sub check()

Dim SAS As SASExcelAddIn

Set SAS = Application.COMAddIns.Item("Sas.ExcelAddIn").Object

Dim prompts As SASPrompts

Set prompts = New SASPrompts

SAS.HelloWorld

End Sub

But it gives the same error on the same line.

 

I have even tried this thing in 4 other PC's but everytime the same error except My PC.

 

How to solve this issue..?? 

CaseySmith
SAS Employee

I suggest checking to see if the SAS Add-in for Microsoft Office (AMO) is installed and activated in Excel on those other machines.  For example, when you open Excel (on the other machines), do you see the SAS ribbon (and able to view its Help->About dialog)?  If not, you'll need to install (if not already) and enable it (SAS Add-in for Microsoft Office) in Excel (which you can do with the SwitcherUtility.exe utility in the AMO installation folder...  ex. C:\Program Files (x86)\SASHome\x86\SASAddinforMicrosoftOffice\7.1\).


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1382 views
  • 0 likes
  • 2 in conversation