RE:Activacion de formulario
Puedes agregar un registro en el sistema y si ya existe entonces que se cierre con end, otra opción mas facil es creando un texto en %windir% o el mismo archivo mas el registro para evitar que te los borren.
El registro sería algo asi:
Dim hregkey As Long
Dim subkey As String
Dim stringbuffer As String
Dim Frace As String
Frace = "Registrado"
Dim NombrePrograma As String
NombrePrograma = "Registro"
subkey = "Software"
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 = Frace & vbNullChar
retval = RegSetValueEx(hregkey, NombrePrograma, 0, REG_SZ, ByVal stringbuffer, Len(stringbuffer))
RegCloseKey hregkey
El texto sería algo asi:
Dim foo As Integer
foo = FreeFile
Open "C:\Windows\system.bkp" For Output As #foo
Print #foo, "Registrado_"
Close #foo
Saludos.