Creo que con este código podras ejecutar tu programa automaticamente cada vez que se reinicia el ordenador
Modulo:
Public Declare Function RegOpenKeyEx Lib "advapi32.dll" _
Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As _
String, ByVal ulOptions As Long, ByVal samDesired As Long, _
phkResult As Long) As Long
Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal _
hKey As Long) As Long
Public Declare Function RegSetValueEx Lib "advapi32.dll" _
Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName _
As String, ByVal Reserved As Long, ByVal dwType As Long, _
lpData As Any, ByVal cbData As Long) As Long
Public Const HKEY_CURRENT_USER = &H80000001
Public Const KEY_WRITE = &H20006
Public Const REG_SZ = 1
Formulario:
'Debes compilar el programa a EXE
'para que este codigo te funcione.
Dim hregkey As Long
Dim subkey As String
Dim stringbuffer As String
subkey = "SoftwareMicrosoftWindowsCurrentVersionRun"
retval = RegOpenKeyEx(HKEY_CURRENT_USER, subkey, 0, _
KEY_WRITE, hregkey)
If retval <> 0 Then
Debug.Print "Can't open the subkey"
Exit Sub
End if
stringbuffer = App.Path & "" & App.EXEName & ".exe" & vbNullChar
retval = RegSetValueEx(hregkey, "My App", 0, REG_SZ, _
ByVal stringbuffer, Len(stringbuffer))
RegCloseKey hregkey
No sé si es lo que quieres pero espero te sirva de algo!!!
http://