+ Reply to Thread
Results 1 to 2 of 2

I can only manually update?

  1. #1
    Registered User
    Join Date
    07-20-2005
    Posts
    13

    I can only manually update?

    Hey everyone,

    Thanks for the help provided me thus far, but now I am having a differnt problem. The spreadsheet is set up with 4 worksheets. The first 2 taking input from the user, the third a sheet of constants and the forth displaying results. On this results page I have a function set up that compares a value in the column currently active (this being on the forth sheet still) to a value on the second page. If they are the same it reads another value from the second page and returns that to formula.

    The problem is when I update the values on the second sheet it does not update the function value on the forth. I have read about a calculate subroutine but I can't get that to work.

    Any Idea's? Here is the code:

    Please Login or Register  to view this content.
    Thank you

    ~Jason

  2. #2
    K Dales
    Guest

    RE: I can only manually update?

    Add a line somewhere (after the Dim would be a good place):
    Application.Volatile
    "Marks a user-defined function as volatile. A volatile function must be
    recalculated whenever calculation occurs in any cells on the worksheet. A
    nonvolatile function is recalculated only when the input variables change.
    This method has no effect if it's not inside a user-defined function used to
    calculate a worksheet cell."
    Note that there has to be something else on that sheet that calculates in
    order for this to take effect.
    --
    - K Dales


    "jclark419" wrote:

    >
    > Hey everyone,
    >
    > Thanks for the help provided me thus far, but now I am having a
    > differnt problem. The spreadsheet is set up with 4 worksheets. The
    > first 2 taking input from the user, the third a sheet of constants and
    > the forth displaying results. On this results page I have a function
    > set up that compares a value in the column currently active (this being
    > on the forth sheet still) to a value on the second page. If they are the
    > same it reads another value from the second page and returns that to
    > formula.
    >
    > The problem is when I update the values on the second sheet it does not
    > update the function value on the forth. I have read about a calculate
    > subroutine but I can't get that to work.
    >
    > Any Idea's? Here is the code:
    >
    >
    > Code:
    > --------------------
    >
    > Option Explicit
    >
    > Public Function eb(additive2 As Integer) As Double
    >
    > Dim count As Integer
    >
    > additive2 = Application.ThisWorkbook.Worksheets("Results").Cells(6, Application.ActiveCell.Column).Value
    >
    > eb = 0
    >
    > count = 6
    >
    > For count = 6 To 10
    > If Application.ThisWorkbook.Worksheets("Additive-Flush").Cells(count, 8).Value = additive2 Then
    > eb = Application.ThisWorkbook.Worksheets("Additive-Flush").Cells(count, 14).Value + eb
    > Else
    > eb = eb + 0
    > End If
    > Next count
    >
    > End Function
    >
    > --------------------
    >
    >
    > Thank you
    >
    > ~Jason
    >
    >
    > --
    > jclark419
    > ------------------------------------------------------------------------
    > jclark419's Profile: http://www.excelforum.com/member.php...o&userid=25430
    > View this thread: http://www.excelforum.com/showthread...hreadid=389051
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1