cancel
Showing results for 
Search instead for 
Did you mean: 

Issues running a macro

Former Member
0 Kudos

Hi everyone.

Sometimes, when I run a macro on determinated computers, It will throw an error message saying that vba can't find an object.

If I logout and login again into SAP, the macro will run without any issue.

Does anyone know why this happends and how can be fixed? I won't get this error on most of the computers but is annoying for the people who has one of the rest.

Thanks in advance for your help and support.

Best Regards

Vic

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Depending on the error, you might try a different way to connect to SAP. Instead of catching the first instance; you can get all open instances and loop through and connect to whichever is possible.

Former Member
0 Kudos

Maybe your code is connecting to the first instance of SAP while you've manually closed it earlier.

You log in; create a new session; and delete the first session.

script_man
Active Contributor
0 Kudos

Hi Victor,

It would be nice if one could see the macro and the error line.

Regards,

ScriptMan

Former Member
0 Kudos

Hi Victor Madera,

                                  the reason is it might be server problem .

Regards,

Mahesh P.