So i have the following problem here.
I'm trying to create a Macro in which a new Row is created, and at the same time the previous Row's information is respectively copied from Sheet A (Main information) to Sheet B (Summary of Sheet A info). The problem i'm having is, because the document is so packed with formulas, calculations and macros, leaving calculation mode in "Automatic" looses me a lot of time for every little cell i change, so i set it to "Manual", and in each different sheet i put in the following code:
Private Sub Worksheet_activate()
ActiveSheet.Calculate
End Sub
So the results only update with each time you change Sheets... The problem with this is, the previous macro i made gets interrupted by this one while copying info from Sheet A to B, which makes perfect sense. What i would like to know is, is there anyway i can edit this code so that while other Macros are executing, this one is ignored ???
Here is the code for the Macro in Sheet A for further analysis if you need:
Sub MEN01Obra()
'
' MEN01Obra Macro
'
'
If Len(Range("C10").Value) = 0 Then Exit Sub
Application.ScreenUpdating = False
Application.Calculation = xlManual
Rows("9:9").Select
Selection.EntireRow.Hidden = True
Rows("10:10").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("H11").Select
Selection.AutoFill Destination:=Range("H10:H11"), Type:=xlFillDefault
Range("H10:H11").Select
Range("O11:T11").Select
Selection.AutoFill Destination:=Range("O10:T11"), Type:=xlFillDefault
Range("O10:T11").Select
Range("V11").Select
Selection.AutoFill Destination:=Range("V10:V11"), Type:=xlFillDefault
Range("V10:V11").Select
Range("Y11:Z11").Select
Selection.AutoFill Destination:=Range("Y10:Z11"), Type:=xlFillDefault
Range("Y10:Z11").Select
Range("AB11:AC11").Select
Selection.AutoFill Destination:=Range("AB10:AC11"), Type:=xlFillDefault
Range("AB10:AC11").Select
Range("B1").Select
Selection.Copy
Range("A10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("b10").Select
'Go to Sheet B to copy info
Sheets("Sheet B").Select
Rows("10:10").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("B10").Select
Sheets("Sheet A").Select
Range("A10").Select
Selection.Copy
Sheets("Sheet B").Select
Range("B10").Select
ActiveSheet.Paste
Range("C11:I11").Select
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("C10:I11"), Type:=xlFillDefault
Range("C10:I11").Select
Range("B11").Select
Selection.Copy
Range("B10").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Obras").Select
Range("B10").Select
Application.ScreenUpdating = True
End Sub
- The red text is what's highlighted in Debug when the code breaks...
All helps is appreciated
Bookmarks