I need some help on the best way to code the following actions so that they only fire one time. Currently I have them in the sub form load and an error handler.

VB Code:
  1. Private Sub Form_Load()
  2.  
  3.    
  4. On Error GoTo FormLoadError
  5.    
  6.     '---------------------------------------
  7.     'delete the flash shortcut
  8.     Dim shell As Object
  9.     Dim link As Object
  10.     Dim DesktopPath As String
  11.     Set shell = CreateObject("WScript.Shell")
  12.     DesktopPath = shell.SpecialFolders("AllUsersDesktop")
  13.     fso.DeleteFile DesktopPath & "\Agent Prospecting Presentation.lnk"
  14.  
  15.     'create a new flash shortcut
  16.     'because we are replacing the old exe
  17.     Set shell = CreateObject("WScript.Shell")
  18.     DesktopPath = shell.SpecialFolders("AllUsersDesktop")
  19.     Set link = shell.CreateShortcut(DesktopPath & "\Agent Prospecting Presentation.lnk")
  20.     'link.Arguments = "1 2 3"
  21.     link.Description = "Agent Prospecting Presentation"
  22.     'link.HotKey = "CTRL+ALT+SHIFT+X"
  23.     link.IconLocation = "C:\WestfieldInsurance\Westfield_1to1F_v1.exe,1"
  24.     link.TargetPath = "C:\MyWestfieldPresentation\Westfield_1to1F_v1.exe"
  25.     'window style 3=maximized, 2=normal
  26.     link.WindowStyle = 2
  27.     'start in
  28.     link.WorkingDirectory = "C:\MyWestfieldPresentation"
  29.     link.Save
  30.    
  31.  
  32.     'this code modifies the existing database without overwriting user data
  33.     'create new table
  34.     Call CreateConnection(objConn)
  35.         objConn.Execute "CREATE TABLE TempDocAudio(n_id  TEXT(50))"
  36.     Call CloseConnection(objConn)
  37.        
  38.    'modify Documents and Campaign tables
  39.     Call CreateConnection(objConn)
  40.        objConn.Execute "ALTER TABLE Documents ADD COLUMN n_mp3 TEXT(50)"
  41.        'cannot use default parameters with ODBC connectivity must switch to OLEDB
  42.        objConn.Execute "ALTER TABLE Documents ADD COLUMN n_wavBol TEXT(50)DEFAULT FALSE"
  43.        
  44.        'add wespak and defender columns
  45.        objConn.Execute "ALTER TABLE Campaign ADD COLUMN c_wespakOn TEXT(50)DEFAULT 1"
  46.        objConn.Execute "ALTER TABLE Campaign ADD COLUMN c_defenderOn TEXT(50)DEFAULT 1"
  47.     Call CloseConnection(objConn)
  48.    
  49.    
  50.     'delete from bios Bud Leister and Reg Stith
  51.     Call CreateConnection(objConn)
  52.         objConn.Execute "DELETE FROM Bios WHERE b_name=""Bud Leister"" OR b_name=""Reg Stith"""
  53.         'MsgBox ("deleted")
  54.     Call CloseConnection(objConn)
  55.          
  56.          
  57.          
  58. ' Error handler
  59. FormLoadError:
  60.   If Err.Number <> 0 Then
  61.         errLogger Err.Number, Err.Description, "This error created on:"
  62.         'Debug.Print errLogger
  63.         Err.Clear
  64.         Resume Next
  65.         'Exit Sub
  66.     End If
  67.  
  68. End Sub