Results 1 to 13 of 13

Thread: Runtime Error '9' - HELP!

Threaded View

  1. #1

    Thread Starter
    New Member Nicole.Q's Avatar
    Join Date
    Oct 2008
    Posts
    8

    Runtime Error '9' - HELP!

    Hi All,

    I'm new to the forum, this is my first post (hope in the right place)... It's my first week at a job, and already I've encountered a serious problem with a macro tied to a number of spreadsheets in an investment company. The previous programmer has left without any notes or documentation - and I'm no good at programming! I'm loosing hair. Here's the issue i'm getting with the code...



    Code:
    Public Sub Auto_Open()
    wrkbkName = Application.ActiveWorkbook.Name
    
    'this little snippet of code determine which branch the user is at
    'based on the ip address
    
    'if ip is like 192.168.1.xxx then we on welthsrvr
    ipadrr = GetIPAddresses(True)
    
    If Left(ipadrr, 9) = "192.168.1" Then
    
    addin_server = "\\Welthsrvr"
    
    ElseIf Left(ipadrr, 9) = "192.168.2" Then
    
    addin_server = "\\Welthsrvr-h"
    Else
    MsgBox "not at either branch"
    End If
    
    addin_full_path = addin_server & addin_path
    
    'I've added a direct path but still no resolution
    
    'AddIns.Add Filename:=addin_full_path, CopyFile:=False
    AddIns.Add ("\\Welthsrvr-h\INDIVIDUAL NON PROPRIETORY ACCOUNTS ON Senior Financial Analyst\Client Accounts\Client Optimizations\client_UDFs.xla"), CopyFile:=False
    
    
    Pub
    AddIns("client_UDFs").Installed = True
    
    Application.Run ("client_UDFs.xla!OpenFiles")
    
    Application.Run "client_UDFs.xla!Shares_Remaining_MarketPrice", wrkbkName
    'Application.Run ("client_UDFs.xla!Summary_TimePeriod")
    Application.Run ("client_UDFs.xla!Update_ProjectionSheet")
    Application.Run ("client_UDFs.xla!Chk4Pref")
    Application.Run ("client_UDFs.xla!ChkInflation")
    Application.Run ("client_UDFs.xla!ChkIndex")
    Application.Run ("client_UDFs.xla!chk6MnthROI")
    Application.Run ("client_UDFs.xla!UpdateSummarySheet")
    Application.Run ("client_UDFs.xla!CloseFiles")
    
    MsgBox "Update Complete", vbInformation
    
    
    
    End Sub



    Code:
    The line of code that results the error:
    
    Sub Auto_close()
    AddIns("client_UDFs").Installed = False
    
    End Sub

    Thanks for any help,

    NICOLE
    Last edited by Nicole.Q; Oct 30th, 2008 at 09:50 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width