LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Circular reference after mouseclick

Hi,

I've got a workbook with several sheets, one is called 'Input", another
"Summarysheet". When the user changes a cell on "Input", the summary needs to
be recalculated, and Summarysheet!A2 is changed into such text.
So the code on the input sheet module is below

Now the question:
If the user finishes his input with a press on the Enter key, all is fine.
If the user finishes his input by clicking another cell, a circular
reference error is displayed.

Anyone suggestions how to prevent this?
Many thanks in advance!

Private Sub Worksheet_Change(ByVal Target As Range)
Dim ws_Summ As Excel.Worksheet
If ActiveSheet.Name = "Input" Then
For Each ws_Summ In Excel.ActiveWorkbook.Sheets
If ws_Summ.Name = "SummarySheet" Then
If ws_Summ.Cells(2, 1) < "Summary sheet needs recalculation!" Then
ws_Summ.Cells(2, 1) = "Summary sheet needs recalculation!"
ws_Summ.Cells(2, 1).Font.Color = RGB(255, 255, 255)
ws_Summ.Cells(2, 1).Font.Bold = True
ws_Summ.Cells(2, 1).Interior.Color = RGB(255, 0, 0)
Exit For
End If
End If
Next
Else
' changes made by code...
End If

End Sub

(Posted before in 'application error' but that seems to be the wrong
discussion)
 
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 Sasa Stankovic Excel Worksheet Functions 3 August 18th 08 03:58 PM
Circular Reference build Excel Worksheet Functions 1 October 19th 07 01:08 PM
Circular Reference munim Excel Worksheet Functions 15 January 5th 06 08:36 AM
circular reference when using a UDF Saira Excel Discussion (Misc queries) 1 September 21st 05 06:39 PM
Circular reference leon Excel Worksheet Functions 1 November 1st 04 12:45 PM


All times are GMT +1. The time now is 10:42 AM.

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"