Desktop productivity for business analysts and programmers

EG Project Script in MS Access VBA

Frequent Learner
Posts: 1

EG Project Script in MS Access VBA

Hello! I recently installed 32-bit SAS EG 7.1 on my machine. Prior to this, I was using 32-bit EG 6.1. 


I have a MS Access program that calls VBA code to run my SAS EG projects. It works fine for my 6.1 projects, but completely crashes when I try to run a 7.1 project through it. Everything appears to be the same, but the code crashes when calling the line: "Set prjObject = app.Open(prjName, "")". 


I've tried a few variations of the REGASM fix that has been posted on similar messages, but none seem to fix my issue. At this point, I'm not even sure if I registered too much and maybe made the problem worse? 

Similar to:



I am running Windows 7 64-bit, MS Office 32-bit, SAS EG 7.1 32-bit, SAS EG 6.1 32-bit (and SAS 9.4 32-bit). 


Here is part of my code, up through the point at which it crashes. Again, the code works fine when I run EG 6.1 projects through it, just not 7.1.


Sub runSASproject(prjName As String, Optional appVersion As String)
Dim app As Object ' As SASEGuide.Application
On Error Resume Next

Dim prjObject ' As SASEGuide.Project
Dim containerName ' As String
Dim containerObject ' As SASEGuide.Container
Dim containerColl ' As SASEGuide.ContainerCollection

containerName = "Process Flow" ' Container Name

Select Case appVersion
Case "7.1"
Set app = CreateObject("SASEGObjectModel.Application.7.1")

Case "6.1"
Set app = CreateObject("SASEGObjectModel.Application.6.1")

End Select

If Checkerror("CreateObject") = True Then
Exit Sub
End If

Set prjObject = app.Open(prjName, "")   ' <------ CRASHES HERE WHEN OPENING 7.1 PROJECTS
If Checkerror("App.Open") = True Then
Exit Sub
End If


****Remaining code does not seem to have a problem at this time****


Any helps would be appreciated as I do not see a difference between my 6.1 and 7.1 installs or how I'm handling the projects.




Ask a Question
Discussion stats
  • 0 replies
  • 1 in conversation