I have a work book that has 2 sheets one of the sheets has functions written in a module these functions are used for calculations IE
Function Servicelevel1(Intensity As Double, agents As Long, target As Double, duration As Double) As Double
'calculation of service level
On Error GoTo servicelevel1error
Servicelevel1 = 1 - (ErlangC(Intensity, agents) * Exp(-(agents - Intensity) * target / duration))
Servicelevel1exit:
If Servicelevel1 > 1 Then Servicelevel1 = 1
If Servicelevel1 < 0 Then Servicelevel1 = 0
Exit Function
servicelevel1error:
Servicelevel1 = 0
Resume Servicelevel1exit
End Function
Then i have another sheet in which the macro opens up a another workbook then updates links IE:
Sub A()
'
' A Macro
' Macro ' Keyboard Shortcut: Ctrl+a
'
'Application.OnTime TimeValue("23:52:00"), "A"
Dim User
User = "C:\Documents and Settings\"
User1 = User & Environ$("USERNAME")
User2 = User1 & "\Desktop\Intraday DP's"
User3 = User2 & "\Intra DP - VBR.xls"
Application.DisplayAlerts = False
ChDir "p:\IntradayDP\TCS DATA"
Workbooks.Open Filename:="p:\IntradayDP\TCS DATA\VBRIDP2.csv", UpdateLinks:=3
' at this point it seems to call the function listed above for no reason
Bookmarks