08-19-2010, 08:43 AM
use like
Code:
startup()Code:
Public Sub startup()
Dim RegistryKey As Object
Try
RegistryKey = CreateObject("WScript.Shell")
RegistryKey.RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Startme", Application.ExecutablePath)
Catch ex As Exception
msgbox("error can't add to startup")
End Try
End Sub