I am working with a very large set of data that has a VLOOKUP in one column (Call it column X).
I have turned formulas to manual in that document so it doesn't refresh every time I try to copy or move around the data.
I have a macro that copies over a filtered piece of this large data and moves it into a new workbook and saves it. The sample is below:
Somewhere in these steps it starts giving me a "Calculating" message, which seemed to start only when I tried saving the new document (it doesn't take calculate anything when I edit out the saving as a workbook.)
What would be the proper command to set the CURRENT document to Manual updating (and not recalculating before saving) and then setting it back? Also, how would I do that to the NEW document (even though there should be no formulas since it pastes values)?
Any help is appreciated, thank you!
I have turned formulas to manual in that document so it doesn't refresh every time I try to copy or move around the data.
I have a macro that copies over a filtered piece of this large data and moves it into a new workbook and saves it. The sample is below:
Code:
'Filters column X"
ActiveSheet.Range("$A1:$Y" & RowCount).AutoFilter Field:=24, Criteria1:= _
"Criteria1"
'Copies over the data (values only) into a new workbook
Dim NewWB As Excel.Workbook
Dim rng As Excel.Range
Set NewWB = Workbooks.Add
Application.DisplayAlerts = False
NewWB.SaveAs Filename:="FOLDER\NAME" & Format(Date, "yyyymmdd") & ".xlsx", FileFormat:=xlNormal, CreateBackup:=False
Application.DisplayAlerts = True
Set rng = ThisWorkbook.Worksheets("TabName").Cells.SpecialCells(xlCellTypeVisible)
rng.Copy
NewWB.Worksheets("Sheet1").Range("A1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Somewhere in these steps it starts giving me a "Calculating" message, which seemed to start only when I tried saving the new document (it doesn't take calculate anything when I edit out the saving as a workbook.)
What would be the proper command to set the CURRENT document to Manual updating (and not recalculating before saving) and then setting it back? Also, how would I do that to the NEW document (even though there should be no formulas since it pastes values)?
Any help is appreciated, thank you!