Welcome to the fracta.net forum!

Share your coding ideas or ask questions.

Question Set cvsApp = CreateObject("ACSUP.cvsApplication") Gives an Error

More
4 years 6 months ago #721 by Mejia
Hello everyone,

I am trying to figure out why some times when I try to create a server for an Avaya report, right on this line I get a Message Box Error of "Attempt to Access Invalid Address". This of course, breaks the entire process and I can't run my report. Any help is appreciated.

Here is my code:
Code:
Sub otherDebug() Dim cvsApp As Object Dim cvsConn As Object Dim cvsSrv As Object Dim Rep As Object Set cvsApp = CreateObject("ACSUP.cvsApplication") '<- is in this line where I get the error "GetLastError. Attempt to access invalid address" Set cvsSrv = CreateObject("ACSUPSRV.cvsServer") Set Rep = CreateObject("ACSREP.cvsReport") Set cvsSrv = cvsApp.Servers(1) End Sub

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #723 by roller
By the way posts won't show until moderated, do not double post.

I have few things to suggest, try early binding like below instead of late biding to the object of Avaya CMS. You need to tick the references in the VBA editor first and declare your object. See if that works any differently.

Dim cvsApp As New ACSUP.cvsApplication
'Dim cvsConn As New ACSCN.cvsConnection
Dim cvsSrv As New ACSUPSRV.cvsServer
Dim Rep As New ACSREP.cvsReport

Another suggestion is to check if the Avaya application is running or not, does that make any difference to how your VBA runs? Did you say the VBA runs sometimes but not all the time?

Third idea is to try Set cvsApp = GetObject("ACSUP.cvsApplication") as you might be creating to many new instances of the application and hitting a limit at the end. Check your Windows Task Manager to see if you have too many orphaned CMS processes.

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago - 4 years 6 months ago #724 by Mejia
I deleted the rest of the code for simplicity, since it is irrelevant for this question. The binding happens immeadiately after declaring the variable (Dim). I guess it is just CMS not loading properly? Because I also get the error some times when I open the actual CMS supervisor application; when I click on the icon, I also get this message
Attachments:
Last edit: 4 years 6 months ago by Mejia.

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #725 by roller
Not sure what the cause could be but judging by what you described did you look at your Windows Defender or any antivirus settings you have running. Some of them have a setting to block access to application and are under the settings of the like prevent zero day vulnerability or anything that could block scripts from running.

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #726 by roller
Did you try GetObject with full path to application instead of Class name; like Set cvsApp = GetObject("C:\programFile\avaya.exe") or whatever it is?

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #727 by Mejia
I did not. I was working on an real time dashboard that refreshes every 25 seconds and was checking the connection to active instance of Avaya that often and got that pesky error. I did some tweaks and now I check the connection only once, then I loop through the real time report every 25 seconds until manually stopped. Seems to be working stable for now.

Please Log in or Create an account to join the conversation.

Time to create page: 0.669 seconds
Powered by Kunena Forum