How create SAPlogon with Visual Script?

Hello, I am trying to create a SAP GUI instance for access any box in the SAP. I am using SAP Scripting with Visual Basic, but when I run the scritp, it show me the following message:

"ActiveX xomponent can´t create object: 'Sapgui.ScriptingCtrl.1'"

I want to check some chains automatically using SAPScript, I have not problem while SAP GUI instance is running, I can log inside the differents boxes, but I want to execute the SAP GUI instance in the script directly.

This is a scritp example to I found in somewhere in the internet:

set LogonControl = CreateObject ( " SAP.LogonControl.1 " )

set conn = LogonControl.NewConnection

if conn.Logon (0, True) <> True then

                MsgBox " Cannot log on! "

End If

Please, someone Can I teach me? How do it?  or which is the error?