ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   AutoCalc Worksheet in ManualCalc Workbook (https://www.excelbanter.com/excel-programming/341947-autocalc-worksheet-manualcalc-workbook.html)

Robert

AutoCalc Worksheet in ManualCalc Workbook
 
Using Tools,Option, I set a fairly large workbook to Manual Calc. I want have
automatic calc on one sheet (or two). In the worksheet objects,
SelectionChange
I have the following code.
"Worksheets(21).Calculate"

The following code is in "Worksheet - Change".
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("Sequence")) Is Nothing Then
With Target
.Offset(25, 0).Value = Format(Now, "dd mmm yy hh:mm:ss")
.Offset(25, 1).Value = Environ("UserName")
End With
End If
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("Date")) Is Nothing Then
With Target
.Offset(23, 0).Value = Format(Now, "dd mmm yy hh:mm:ss")
.Offset(23, 1).Value = Environ("UserName")
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub

I am not able to have worksheet21 in calc mode. Even Shift+F9 is not able
to recalc. What could be wrong. F9 however, is able to recalc the workbook.

Thank you,
Robert



Tom Ogilvy

AutoCalc Worksheet in ManualCalc Workbook
 
Do you have code like

Worksheets(21).EnableCalculation = False


--
Regards,
Tom Ogilvy

"Robert" wrote in message
...
Using Tools,Option, I set a fairly large workbook to Manual Calc. I want

have
automatic calc on one sheet (or two). In the worksheet objects,
SelectionChange
I have the following code.
"Worksheets(21).Calculate"

The following code is in "Worksheet - Change".
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("Sequence")) Is Nothing Then
With Target
.Offset(25, 0).Value = Format(Now, "dd mmm yy hh:mm:ss")
.Offset(25, 1).Value = Environ("UserName")
End With
End If
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("Date")) Is Nothing Then
With Target
.Offset(23, 0).Value = Format(Now, "dd mmm yy hh:mm:ss")
.Offset(23, 1).Value = Environ("UserName")
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub

I am not able to have worksheet21 in calc mode. Even Shift+F9 is not able
to recalc. What could be wrong. F9 however, is able to recalc the

workbook.

Thank you,
Robert





Robert

AutoCalc Worksheet in ManualCalc Workbook
 
Thanks Tom. I did a search before retiring. I do not. However I got a hint in
the middle of my sleep (yes 3.30am).Got up immediately and checked. Sheet21
was referencing another sheet. Problem was solved by changing to calc mode
for that sheet.

Robert


All times are GMT +1. The time now is 11:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com