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




Reply With Quote