worksheets do not work on other pc

  • HI,

    I have this problem which is really killing me. I have built a spreadsheet using some UDF. In the UDF, I use a with/end with, and when using the with statement, i specified the with workbooks(" ").worksheets("")

    When I tried to link the values (calculated by this UDF) to another spreadsheet, everything works. But when my manager tries it on his pc,
    he always got the $values everytime.

    I really dont understand why it works on my pc but not his. And I'm taking
    the blame along the process X(

    Any help is appreciated!


  • Re: worksheets do not work on other pc


    Here are what I have:

    Function PLCalc(inputvar As String, ddate As Date) As Double

    Dim start_date As Date
    PLCalc = 0
    start_date = "11 / 1 / 04"

    j = WorksheetFunction.Days360(start_date, ddate) + 1

    With ThisWorkbook.Worksheets("JD Entry")

    Select Case inputvar

    Case "sef_trader1_hub1"

    For i = 1 To 56
    temp = .Cells(219 + i, "AO").Value * .Cells(325 + j + 35 * (i - 1), "AH").Value
    PLCalc = PLCalc + temp
    Next i

    End Select
    End With
    End Function

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!