Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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:


Code:
--------------------

Option Explicit

Public Function eb(additive2 As Integer) As Double

Dim count As Integer

additive2 = Application.ThisWorkbook.Worksheets("Results").Cel ls(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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default 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").Cel ls(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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to update one manually-entered value from another? 1robc57 Excel Worksheet Functions 2 February 2nd 06 05:07 AM
Does this have to be done manually? Dorn Excel Discussion (Misc queries) 1 September 22nd 05 07:17 PM
Manually Update Listindex DB Excel Programming 4 June 11th 05 04:37 AM
Manually update links Emma Excel Worksheet Functions 0 February 22nd 05 01:23 PM
VBA calculate manually Jan[_13_] Excel Programming 2 September 22nd 04 07:11 PM


All times are GMT +1. The time now is 05:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"