Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
rphpacheco
Creator III
Creator III

Error in Macro

Hello All!

I have a macro in a document and accessing it via the Access Point displays the following error:

"Analysis of macro failed. Functionality was lost

Robo_Refresh

Error: ActiveX component can not create object: 'WScript.Shell' "

Sub Robo_Refresh

 

   

       Set WshShell = CreateObject("WScript.Shell")

       RegKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Cassol\StatusCargaCadeiaValores"

      

       if WshShell.RegRead(RegKey) = "CARREGOU" Then

             WshShell.RegWrite RegKey, "ATUALIZOU", "REG_SZ"

           LimparSelecoes()
           SetarData()
     
      End If

End Sub

Error.jpg

What is going wrong?

4 Replies
rphpacheco
Creator III
Creator III
Author

Any suggestions to the problem?

Thanks.

Anonymous
Not applicable

Raphael, make sure you allow "system acess" to the macro.

rphpacheco
Creator III
Creator III
Author

Yes Michael, the access permissions for the macro already enabled. Yet the problem occurred.

Anonymous
Not applicable

It is in multiple places: in macro module (left bottom, two palces), and user allows all macro (either on macro security dialog or user preferences - security, the top checkbox)