cpupartsplz
New Member
- Joined
- Oct 18, 2006
- Messages
- 14
Hey guys, I could use some help here.
I have a ~7MB spreadsheet with multiple tabs and thousands of rows of data across different sheets. I also utilize macros to process new data and recalculate formulas across different tabs based on a reference data tab.
After I run a macro (code below), the Automatic and Manual (F9) calculations don't seem to work. If I exit and reopen the Excel file, the formulas will calculate properly again.
I am not sure if this is a memory/cache issue or I am doing something in the macro that messes up the ability to calculate. Has anyone seen anything like this before?
I was thinking there may be a fix where I can clear the memory/cache to fix it?
I have a ~7MB spreadsheet with multiple tabs and thousands of rows of data across different sheets. I also utilize macros to process new data and recalculate formulas across different tabs based on a reference data tab.
After I run a macro (code below), the Automatic and Manual (F9) calculations don't seem to work. If I exit and reopen the Excel file, the formulas will calculate properly again.
I am not sure if this is a memory/cache issue or I am doing something in the macro that messes up the ability to calculate. Has anyone seen anything like this before?
I was thinking there may be a fix where I can clear the memory/cache to fix it?
VBA Code:
Sub Test()
'
' Test Macro
'
Application.ScreenUpdating = False
Application.Calculation = xlManual
Sheets("Test").Select
' Clear Test Contents
Cells.Select
Selection.ClearContents
' Paste Test Data
Range("A1").Select
ActiveSheet.PasteSpecial Format:="Unicode Text", Link:=False, _
DisplayAsIcon:=False, NoHTMLFormatting:=True
' Remove Unnecessary Test Data
Range("B:H,J:N").Select
Selection.ClearContents
Range("2:3,5:7").Select
Selection.ClearContents
' Calculate
Calculate
'Application.Calculate
' Clear Copy Contents
Sheets("Copy").Select
Range("C2:C5001,J2:J5001").Select
Selection.ClearContents
' Copy Test 1 Data
Sheets("Test").Select
Range("A8:A5000").Select
Selection.Copy
' Paste Test 1 Data
Sheets("Copy").Select
Range("C3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
' Copy Test 2 Data
Sheets("Test").Select
Range("I10:I5000").Select
Selection.Copy
Range("A1").Select
' Paste Test 2 Data
Sheets("Copy").Select
Range("J3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("C1").Select
' Calculate
Calculate
'Application.Calculate
Application.ScreenUpdating = True
End Sub