Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default circular reference code

I believe you would have to include a public, module level variable in the
worksheet module to hold the current value.

This code goes in the Sheet1 module

Public A1Value As Double

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
A1Value = A1Value + Target.Value
Application.EnableEvents = False
Target.Value = A1Value
Application.EnableEvents = True
End If
End Sub

and this in the ThisWorkbook module

Private Sub Workbook_Open()
A1Value = Worksheets("Sheet1").Range("A1").Value
End Sub





On Fri, 19 Nov 2004 08:46:04 -0600, marksuza
wrote:


Hi again,

I dont know if the code I inputed in my first message was the most
appropriate, or if that diverted from the real problem. Basically, I
want to input a number in a cell and add the number I input to the
previous number that was in that cell. Thanks again.

Marcos


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
Circular reference help Alexey[_3_] Excel Discussion (Misc queries) 3 September 19th 08 03:26 PM
circular reference circular reference Excel Worksheet Functions 2 August 9th 08 10:05 PM
circular reference dusty Excel Discussion (Misc queries) 1 November 15th 07 06:56 PM
Circular Reference build Excel Worksheet Functions 1 October 19th 07 01:08 PM
Circular Reference MahaRaj® Excel Programming 3 October 19th 04 11:32 PM


All times are GMT +1. The time now is 01:07 PM.

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

About Us

"It's about Microsoft Excel"