Private Sub Application_Startup()
Dim sLastRun as String
sLastRun = Format(now, "ddddd")
If GetSetting("MyAppName", "Settings", "LastRun", "") = sLastRun Then
Exit Sub
End If
' Your code goes in here
MsgBox "Welcome, " & Application.GetNamespace("MAPI").CurrentUser
Application.ActiveExplorer.WindowState = olMaximized
' Your code finishes here
SaveSetting "MyAppName", "Settings", "LastRun", sLastRun
End SubI haven't properly tested it, but it should work.You are not logged in, either login or create an account to post comments
Example:
Private Sub Application_Startup() MsgBox "Welcome, " & Application.GetNamespace("MAPI").CurrentUser Application.ActiveExplorer.WindowState = olMaximized End Subposted by SuperSquirrel at 4:54 PM on November 10, 2009