Workbook close automatically when attempting to run VBA macro

%3CLINGO-SUB%20id%3D%22lingo-sub-1621955%22%20slang%3D%22en-US%22%3EWorkbook%20close%20automatically%20when%20attempting%20to%20run%20VBA%20macro%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1621955%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20try%20to%20run%20the%20macro%20but%20the%20workbook%20close%20automatically%2C%20pls.%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1621955%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1623005%22%20slang%3D%22en-US%22%3ERe%3A%20Workbook%20close%20automatically%20when%20attempting%20to%20run%20VBA%20macro%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1623005%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F776385%22%20target%3D%22_blank%22%3E%40Miata118%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EIf%20you%20could%20copy%20your%20code%20here%2C%20it%20may%20help%20troubleshooting.%3C%2FP%3E%3CP%3EIf%20you%20can't%2C%20perhaps%20look%20for%20a%20line%20that%20reads%20something%20like%26nbsp%3B%3CEM%3Eworkbook.close%26nbsp%3B%3C%2FEM%3Ethat%20is%20associated%20with%20your%20button%20function.%20This%20may%20be%20your%20issue.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1624300%22%20slang%3D%22en-US%22%3ERe%3A%20Workbook%20close%20automatically%20when%20attempting%20to%20run%20VBA%20macro%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1624300%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F703724%22%20target%3D%22_blank%22%3E%40Bennadeau%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20replying%20me%20to%20assist%20help%20on%20my%20code%2C%20kindly%20found%20the%20code%20below%20for%20your%20investigation%2C%20FYI%2C%20below%20code%20is%20not%20from%20me%2C%20it%20is%20made%20by%20someone%20else%20who%20is%20left%20....I'm%20running%20a%2032%20bit%20excel%20and%20I%20know%20some%20of%20the%20code%20is%20for%2064%20bit%20excel%2C%20the%20automatic%20close%20is%20not%20always.....but%20once%20it%20close%20automatically%2C%20even%20I%20close%20and%20open%20the%20same%20excel%20again%2C%20its%20doesn't%20work%2C%20I%20need%20to%20recall%20the%20previous%20version%20to%20restore%2C%20the%20crashed%20and%20restored%20version%20are%20with%20the%20same%20VBA%20code%2C%20I%20did%20not%20change%20any%20code%20before%20or%20after%2C%20pls.%20help%2C%20thank%20you.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3ESub%20WatchJewelry()%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EDim%20ARR1%20As%20Variant%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EDim%20FN1%20As%20Variant%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EARR1%20%3D%20Array(%22CN_W%22%2C%20%22CN_JW%22%2C%20%22Series_W%22%2C%20%22Series_JW%22%2C%20%22CN_CW%22%2C%20%22CN_CH_FRAN%22%2C%20%22CN_FR_FRAN%22%2C%20%22R1%22%2C%20%22R2%22%2C%20%22BUD%22%2C%20%22TH%20BB%22%2C%20%22PY%22%2C%20%22Series%20PY%22%2C%20%22PY_CW%22)%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E'FN1%20%3D%20%22O%3A%5CFinance%20%26amp%3B%20Operations%5CGreater%20China%20Sharefolder%5CTemplates%5CDaily%20Sales%20Report%5CChina%5C2020%5CCN%20Daily%20Sales%20Report%202020_v1.42%20-%20Master.xlsm%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(ARR1).Copy%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(ARR1).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ECells.Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.Copy%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.PasteSpecial%20Paste%3A%3DxlPasteFormulas%2C%20Operation%3A%3DxlNone%2C%20SkipBlanks%3A%3DFalse%2C%20Transpose%3A%3DFalse%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.CutCopyMode%20%3D%20False%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22CN_W%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3E'ActiveWorkbook.BreakLink%20Name%3A%3DFN1%2C%20Type%3A%3DxlExcelLinks%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.Run%20%22BLinks%22%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EActiveWorkbook.SaveAs%20Filename%3A%3D%22O%3A%5CFinance%20%26amp%3B%20Operations%5CGreater%20China%20Sharefolder%5CTemplates%5CDaily%20Sales%20Report%5CChina%5C2020%5CReport%5C%22%20%26amp%3B%20Range(%22DD2%22).Text%20%26amp%3B%20%22%5CW%26amp%3BJ%5C%22%20%26amp%3B%20%22CN%20Daily%20Sales%20Report_W%26amp%3BJ%20(5%20Brands)_%22%20%26amp%3B%20Range(%22DD1%22).Text%20%26amp%3B%20%22.xlsx%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EEnd%20Sub%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESub%20Watch()%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EDim%20ARR1%20As%20Variant%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EDim%20FN1%20As%20Variant%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EARR1%20%3D%20Array(%22CN_W%22%2C%20%22Series_W%22%2C%20%22CN_CW%22%2C%20%22R1%22%2C%20%22R2%22%2C%20%22BUD%22%2C%20%22TH%20BB%22%2C%20%22PY%22%2C%20%22Series%20PY%22%2C%20%22PY_CW%22)%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E'FN1%20%3D%20%22O%3A%5CFinance%20%26amp%3B%20Operations%5CGreater%20China%20Sharefolder%5CTemplates%5CDaily%20Sales%20Report%5CChina%5C2020%5CCN%20Daily%20Sales%20Report%202020_v1.42%20-%20Master.xlsm%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESheets(ARR1).Copy%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(ARR1).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ECells.Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.Copy%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.PasteSpecial%20Paste%3A%3DxlPasteFormulas%2C%20Operation%3A%3DxlNone%2C%20SkipBlanks%3A%3DFalse%2C%20Transpose%3A%3DFalse%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.CutCopyMode%20%3D%20False%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22R1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22JewelleryR1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22R2%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22JewelleryR2%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22BUD%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22JewelleryBUD%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22PY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22JewelleryPY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22Series%20PY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22JewelleryPYSER%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESheets(%22CN_W%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3E'ActiveWorkbook.BreakLink%20Name%3A%3DFN1%2C%20Type%3A%3DxlExcelLinks%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.Run%20%22BLinks%22%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EActiveWorkbook.SaveAs%20Filename%3A%3D%22O%3A%5CFinance%20%26amp%3B%20Operations%5CGreater%20China%20Sharefolder%5CTemplates%5CDaily%20Sales%20Report%5CChina%5C2020%5CReport%5C%22%20%26amp%3B%20Range(%22DD2%22).Text%20%26amp%3B%20%22%5CWatch%5C%22%20%26amp%3B%20%22CN%20Daily%20Sales%20Report_Watch_%22%20%26amp%3B%20Range(%22DD1%22).Text%20%26amp%3B%20%22.xlsx%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EEnd%20Sub%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESub%20Jewellery()%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EDim%20ARR1%20As%20Variant%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EDim%20FN1%20As%20Variant%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EARR1%20%3D%20Array(%22CN_JW%22%2C%20%22Series_JW%22%2C%20%22CN_CH_FRAN%22%2C%20%22CN_FR_FRAN%22%2C%20%22R1%22%2C%20%22R2%22%2C%20%22BUD%22%2C%20%22PY%22%2C%20%22Series%20PY%22)%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E'FN1%20%3D%20%22O%3A%5CFinance%20%26amp%3B%20Operations%5CGreater%20China%20Sharefolder%5CTemplates%5CDaily%20Sales%20Report%5CChina%5C2020%5CCN%20Daily%20Sales%20Report%202020_v1.42%20-%20Master.xlsm%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESheets(ARR1).Copy%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(ARR1).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ECells.Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.Copy%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.PasteSpecial%20Paste%3A%3DxlPasteFormulas%2C%20Operation%3A%3DxlNone%2C%20SkipBlanks%3A%3DFalse%2C%20Transpose%3A%3DFalse%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.CutCopyMode%20%3D%20False%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22R1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22WatchR1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22R2%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22WatchR2%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22BUD%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22WatchBUD%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22PY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22WatchPY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22Series%20PY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22WatchPYSER%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESheets(%22CN_JW%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3E'ActiveWorkbook.BreakLink%20Name%3A%3DFN1%2C%20Type%3A%3DxlExcelLinks%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.Run%20%22BLinks%22%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EActiveWorkbook.SaveAs%20Filename%3A%3D%22O%3A%5CFinance%20%26amp%3B%20Operations%5CGreater%20China%20Sharefolder%5CTemplates%5CDaily%20Sales%20Report%5CChina%5C2020%5CReport%5C%22%20%26amp%3B%20Range(%22DD2%22).Text%20%26amp%3B%20%22%5CJewellery%5C%22%20%26amp%3B%20%22CN%20Daily%20Sales%20Report_Jewellery_%22%20%26amp%3B%20Range(%22DD1%22).Text%20%26amp%3B%20%22.xlsx%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EEnd%20Sub%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESub%20Chaumet()%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EDim%20ARR1%20As%20Variant%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EDim%20FN1%20As%20Variant%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EARR1%20%3D%20Array(%22CN_JW%22%2C%20%22Series_JW%22%2C%20%22CN_CH_FRAN%22%2C%20%22R1%22%2C%20%22R2%22%2C%20%22BUD%22%2C%20%22PY%22%2C%20%22Series%20PY%22)%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E'FN1%20%3D%20%22O%3A%5CFinance%20%26amp%3B%20Operations%5CGreater%20China%20Sharefolder%5CTemplates%5CDaily%20Sales%20Report%5CChina%5C2020%5CCN%20Daily%20Sales%20Report%202020_v1.42%20-%20Master.xlsm%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESheets(ARR1).Copy%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(ARR1).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ECells.Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.Copy%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.PasteSpecial%20Paste%3A%3DxlPasteFormulas%2C%20Operation%3A%3DxlNone%2C%20SkipBlanks%3A%3DFalse%2C%20Transpose%3A%3DFalse%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.CutCopyMode%20%3D%20False%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22CN_JW%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22Fred%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22CN_JW%22).Name%20%3D%20%22CN_CH%22%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22Series_JW%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22FredSER%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22Series_JW%22).Name%20%3D%20%22Series_CH%22%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22R1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22WatchR1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22R1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22FredR1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22R2%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22WatchR2%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22R2%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22FredR2%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22BUD%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22WatchBUD%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22BUD%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22FredBUD%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22PY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22WatchPY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22PY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22FredPY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22Series%20PY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22WatchPYSER%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22Series%20PY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22FredPYSER%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESheets(%22CN_CH%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3E'ActiveWorkbook.BreakLink%20Name%3A%3DFN1%2C%20Type%3A%3DxlExcelLinks%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.Run%20%22BLinks%22%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EActiveWorkbook.SaveAs%20Filename%3A%3D%22O%3A%5CFinance%20%26amp%3B%20Operations%5CGreater%20China%20Sharefolder%5CTemplates%5CDaily%20Sales%20Report%5CChina%5C2020%5CReport%5C%22%20%26amp%3B%20Range(%22DD2%22).Text%20%26amp%3B%20%22%5CCH%5C%22%20%26amp%3B%20%22CN%20Daily%20Sales%20Report_CHCN_%22%20%26amp%3B%20Range(%22DD1%22).Text%20%26amp%3B%20%22.xlsx%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EEnd%20Sub%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESub%20Fred()%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EDim%20ARR1%20As%20Variant%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EDim%20FN1%20As%20Variant%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EARR1%20%3D%20Array(%22CN_JW%22%2C%20%22Series_JW%22%2C%20%22CN_FR_FRAN%22%2C%20%22R1%22%2C%20%22R2%22%2C%20%22BUD%22%2C%20%22PY%22%2C%20%22Series%20PY%22)%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E'FN1%20%3D%20%22O%3A%5CFinance%20%26amp%3B%20Operations%5CGreater%20China%20Sharefolder%5CTemplates%5CDaily%20Sales%20Report%5CChina%5C2020%5CCN%20Daily%20Sales%20Report%202020_v1.42%20-%20Master.xlsm%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESheets(ARR1).Copy%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(ARR1).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ECells.Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.Copy%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.PasteSpecial%20Paste%3A%3DxlPasteFormulas%2C%20Operation%3A%3DxlNone%2C%20SkipBlanks%3A%3DFalse%2C%20Transpose%3A%3DFalse%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.CutCopyMode%20%3D%20False%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22CN_JW%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22Chaumet%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22CN_JW%22).Name%20%3D%20%22CN_FR%22%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22Series_JW%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22ChaumetSER%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22Series_JW%22).Name%20%3D%20%22Series_FR%22%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22R1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22WatchR1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22R1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22ChaumetR1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22R2%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22WatchR2%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22R2%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22ChaumetR2%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22BUD%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22WatchBUD%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22BUD%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22ChaumetBUD%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22PY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22WatchPY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22PY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22ChaumetPY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22Series%20PY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22WatchPYSER%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22Series%20PY%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22ChaumetPYSER%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.EntireRow.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESheets(%22CN_FR%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3E'ActiveWorkbook.BreakLink%20Name%3A%3DFN1%2C%20Type%3A%3DxlExcelLinks%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.Run%20%22BLinks%22%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EActiveWorkbook.SaveAs%20Filename%3A%3D%22O%3A%5CFinance%20%26amp%3B%20Operations%5CGreater%20China%20Sharefolder%5CTemplates%5CDaily%20Sales%20Report%5CChina%5C2020%5CReport%5C%22%20%26amp%3B%20Range(%22DD2%22).Text%20%26amp%3B%20%22%5CFR%5C%22%20%26amp%3B%20%22CN%20Daily%20Sales%20Report_FRCN_%22%20%26amp%3B%20Range(%22DD1%22).Text%20%26amp%3B%20%22.xlsx%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EEnd%20Sub%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESub%20CW()%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EDim%20ARR1%20As%20Variant%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EDim%20FN1%20As%20Variant%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EARR1%20%3D%20Array(%22CN_CW%22%2C%20%22PY_CW%22)%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E'FN1%20%3D%20%22O%3A%5CFinance%20%26amp%3B%20Operations%5CGreater%20China%20Sharefolder%5CTemplates%5CDaily%20Sales%20Report%5CChina%5C2020%5CCN%20Daily%20Sales%20Report%202020_v1.42%20-%20Master.xlsm%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESheets(ARR1).Copy%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(ARR1).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ECells.Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.Copy%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESelection.PasteSpecial%20Paste%3A%3DxlPasteFormulas%2C%20Operation%3A%3DxlNone%2C%20SkipBlanks%3A%3DFalse%2C%20Transpose%3A%3DFalse%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.CutCopyMode%20%3D%20False%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3ESheets(%22CN_CW%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ERange(%22A1%22).Select%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3E'ActiveWorkbook.BreakLink%20Name%3A%3DFN1%2C%20Type%3A%3DxlExcelLinks%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.Run%20%22BLinks%22%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EActiveWorkbook.SaveAs%20Filename%3A%3D%22O%3A%5CFinance%20%26amp%3B%20Operations%5CGreater%20China%20Sharefolder%5CTemplates%5CDaily%20Sales%20Report%5CChina%5C2020%5CReport%5C%22%20%26amp%3B%20Range(%22DD2%22).Text%20%26amp%3B%20%22%5CCW%5C%22%20%26amp%3B%20%22CN%20Daily%20Sales%20Report_Connected%20Watch_%22%20%26amp%3B%20Range(%22DD1%22).Text%20%26amp%3B%20%22.xlsx%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EEnd%20Sub%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESub%20BLinks()%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EDim%20uniqueName%20As%20Name%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EDim%20extLink%20As%20Variant%2C%20arrayXValues()%20As%20Variant%2C%20arrayValues()%20As%20Variant%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EDim%20wb%20As%20Workbook%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EDim%20sh%20As%20Worksheet%2C%20sh_temp%20As%20Worksheet%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ECall%20turnOffThings%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ESet%20wb%20%3D%20ActiveWorkbook%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EFor%20Each%20uniqueName%20In%20wb.Names%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EIf%20isNameLinkOffWorkbook(uniqueName)%20%3D%20True%20Then%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EuniqueName.Delete%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EEnd%20If%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ENext%20uniqueName%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EFor%20Each%20sh%20In%20wb.Worksheets%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ENext%20sh%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EIf%20Not%20IsEmpty(wb.LinkSources(xlExcelLinks))%20Then%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EFor%20Each%20extLink%20In%20wb.LinkSources(xlExcelLinks)%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3Ewb.BreakLink%20extLink%2C%20xlExcelLinks%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3ENext%20extLink%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EEnd%20If%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ECall%20turnOnThings%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EEnd%20Sub%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EFunction%20isNameLinkOffWorkbook(namedRangeName%20As%20Name)%20As%20Boolean%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EisNameLinkOffWorkbook%20%3D%20False%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EIf%20ActiveWorkbook.Names(namedRangeName.Name).RefersTo%20Like%20%22*%5B%5B%5D*%22%20Or%20ActiveWorkbook.Names(namedRangeName.Name).RefersTo%20Like%20%22*%5C*%22%20Then%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EisNameLinkOffWorkbook%20%3D%20True%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EEnd%20If%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EEnd%20Function%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESub%20turnOffThings()%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EApplication.ScreenUpdating%20%3D%20False%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.EnableEvents%20%3D%20False%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.Calculation%20%3D%20xlCalculationManual%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EEnd%20Sub%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESub%20turnOnThings()%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EApplication.ScreenUpdating%20%3D%20True%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.EnableEvents%20%3D%20True%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EApplication.Calculation%20%3D%20xlCalculationAutomatic%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EEnd%20Sub%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1625967%22%20slang%3D%22en-US%22%3ERe%3A%20Workbook%20close%20automatically%20when%20attempting%20to%20run%20VBA%20macro%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1625967%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F776385%22%20target%3D%22_blank%22%3E%40Miata118%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENothing%20major%20pops%20up%20when%20I%20look%20at%20the%20code.%20And%20you%20mentioned%20you%20haven't%20change%20it%20so%20let's%20assume%20the%20code%20it%20right%20for%20now.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20suspect%20you%20may%20have%20a%20mapped%20drive%20issue.%20Can%20you%20confirm%20you%20have%20access%20to%20this%20exact%20path%3A%20O%3A%5CFinance%20%26amp%3B%20Operations%5CGreater%20China%20Sharefolder%5CTemplates%5CDaily%20Sales%20Report%5CChina%5C2020%5C%3C%2FP%3E%3CP%3EThis%20is%20used%20multiple%20times%20in%20the%20code%20and%20if%20it%20is%20only%20available%20on%20the%20other%20persons%20computer%20(the%20one%20who%20left)%2C%20that%20might%20be%20your%20issue.%20Maybe%20that%20drive%20is%20mapped%20with%20a%20different%20letter%20on%20your%20computer%3F%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20confirm%20you%20are%20using%20a%20version%20of%20Excel%20that%20is%202007%20or%20newer.%20I%20really%20hope%20for%20newer%20than%20that%20for%20security%20reason%20but%20that's%20for%20another%20day.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I have try to run the macro but the workbook close automatically, pls. help

3 Replies
Highlighted

Hi @Miata118 ,

If you could copy your code here, it may help troubleshooting.

If you can't, perhaps look for a line that reads something like workbook.close that is associated with your button function. This may be your issue.

Highlighted

@Bennadeau 

 

Thank you for replying me to assist help on my code, kindly found the code below for your investigation, FYI, below code is not from me, it is made by someone else who is left ....I'm running a 32 bit excel and I know some of the code is for 64 bit excel, the automatic close is not always.....but once it close automatically, even I close and open the same excel again, its doesn't work, I need to recall the previous version to restore, the crashed and restored version are with the same VBA code, I did not change any code before or after, pls. help, thank you.

 

Sub WatchJewelry()

Dim ARR1 As Variant
Dim FN1 As Variant

ARR1 = Array("CN_W", "CN_JW", "Series_W", "Series_JW", "CN_CW", "CN_CH_FRAN", "CN_FR_FRAN", "R1", "R2", "BUD", "TH BB", "PY", "Series PY", "PY_CW")
'FN1 = "O:\Finance & Operations\Greater China Sharefolder\Templates\Daily Sales Report\China\2020\CN Daily Sales Report 2020_v1.42 - Master.xlsm"


Sheets(ARR1).Copy
Sheets(ARR1).Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

Sheets("CN_W").Select
Range("A1").Select

'ActiveWorkbook.BreakLink Name:=FN1, Type:=xlExcelLinks

Application.Run "BLinks"

ActiveWorkbook.SaveAs Filename:="O:\Finance & Operations\Greater China Sharefolder\Templates\Daily Sales Report\China\2020\Report\" & Range("DD2").Text & "\W&J\" & "CN Daily Sales Report_W&J (5 Brands)_" & Range("DD1").Text & ".xlsx"

End Sub

Sub Watch()

Dim ARR1 As Variant
Dim FN1 As Variant

ARR1 = Array("CN_W", "Series_W", "CN_CW", "R1", "R2", "BUD", "TH BB", "PY", "Series PY", "PY_CW")
'FN1 = "O:\Finance & Operations\Greater China Sharefolder\Templates\Daily Sales Report\China\2020\CN Daily Sales Report 2020_v1.42 - Master.xlsm"

Sheets(ARR1).Copy
Sheets(ARR1).Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

Sheets("R1").Select
Range("JewelleryR1").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("R2").Select
Range("JewelleryR2").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("BUD").Select
Range("JewelleryBUD").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("PY").Select
Range("JewelleryPY").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("Series PY").Select
Range("JewelleryPYSER").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("CN_W").Select
Range("A1").Select

'ActiveWorkbook.BreakLink Name:=FN1, Type:=xlExcelLinks

Application.Run "BLinks"

ActiveWorkbook.SaveAs Filename:="O:\Finance & Operations\Greater China Sharefolder\Templates\Daily Sales Report\China\2020\Report\" & Range("DD2").Text & "\Watch\" & "CN Daily Sales Report_Watch_" & Range("DD1").Text & ".xlsx"

End Sub

Sub Jewellery()

Dim ARR1 As Variant
Dim FN1 As Variant

ARR1 = Array("CN_JW", "Series_JW", "CN_CH_FRAN", "CN_FR_FRAN", "R1", "R2", "BUD", "PY", "Series PY")
'FN1 = "O:\Finance & Operations\Greater China Sharefolder\Templates\Daily Sales Report\China\2020\CN Daily Sales Report 2020_v1.42 - Master.xlsm"

Sheets(ARR1).Copy
Sheets(ARR1).Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

Sheets("R1").Select
Range("WatchR1").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("R2").Select
Range("WatchR2").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("BUD").Select
Range("WatchBUD").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("PY").Select
Range("WatchPY").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("Series PY").Select
Range("WatchPYSER").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("CN_JW").Select
Range("A1").Select

'ActiveWorkbook.BreakLink Name:=FN1, Type:=xlExcelLinks

Application.Run "BLinks"

ActiveWorkbook.SaveAs Filename:="O:\Finance & Operations\Greater China Sharefolder\Templates\Daily Sales Report\China\2020\Report\" & Range("DD2").Text & "\Jewellery\" & "CN Daily Sales Report_Jewellery_" & Range("DD1").Text & ".xlsx"

End Sub

Sub Chaumet()

Dim ARR1 As Variant
Dim FN1 As Variant

ARR1 = Array("CN_JW", "Series_JW", "CN_CH_FRAN", "R1", "R2", "BUD", "PY", "Series PY")
'FN1 = "O:\Finance & Operations\Greater China Sharefolder\Templates\Daily Sales Report\China\2020\CN Daily Sales Report 2020_v1.42 - Master.xlsm"

Sheets(ARR1).Copy
Sheets(ARR1).Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

Sheets("CN_JW").Select
Range("Fred").Select
Selection.EntireRow.Delete
Sheets("CN_JW").Name = "CN_CH"
Range("A1").Select

Sheets("Series_JW").Select
Range("FredSER").Select
Selection.EntireRow.Delete
Sheets("Series_JW").Name = "Series_CH"
Range("A1").Select

Sheets("R1").Select
Range("WatchR1").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("R1").Select
Range("FredR1").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("R2").Select
Range("WatchR2").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("R2").Select
Range("FredR2").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("BUD").Select
Range("WatchBUD").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("BUD").Select
Range("FredBUD").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("PY").Select
Range("WatchPY").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("PY").Select
Range("FredPY").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("Series PY").Select
Range("WatchPYSER").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("Series PY").Select
Range("FredPYSER").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("CN_CH").Select
Range("A1").Select

'ActiveWorkbook.BreakLink Name:=FN1, Type:=xlExcelLinks

Application.Run "BLinks"

ActiveWorkbook.SaveAs Filename:="O:\Finance & Operations\Greater China Sharefolder\Templates\Daily Sales Report\China\2020\Report\" & Range("DD2").Text & "\CH\" & "CN Daily Sales Report_CHCN_" & Range("DD1").Text & ".xlsx"

End Sub
Sub Fred()

Dim ARR1 As Variant
Dim FN1 As Variant

ARR1 = Array("CN_JW", "Series_JW", "CN_FR_FRAN", "R1", "R2", "BUD", "PY", "Series PY")
'FN1 = "O:\Finance & Operations\Greater China Sharefolder\Templates\Daily Sales Report\China\2020\CN Daily Sales Report 2020_v1.42 - Master.xlsm"

Sheets(ARR1).Copy
Sheets(ARR1).Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

Sheets("CN_JW").Select
Range("Chaumet").Select
Selection.EntireRow.Delete
Sheets("CN_JW").Name = "CN_FR"
Range("A1").Select

Sheets("Series_JW").Select
Range("ChaumetSER").Select
Selection.EntireRow.Delete
Sheets("Series_JW").Name = "Series_FR"
Range("A1").Select

Sheets("R1").Select
Range("WatchR1").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("R1").Select
Range("ChaumetR1").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("R2").Select
Range("WatchR2").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("R2").Select
Range("ChaumetR2").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("BUD").Select
Range("WatchBUD").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("BUD").Select
Range("ChaumetBUD").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("PY").Select
Range("WatchPY").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("PY").Select
Range("ChaumetPY").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("Series PY").Select
Range("WatchPYSER").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("Series PY").Select
Range("ChaumetPYSER").Select
Selection.EntireRow.Delete
Range("A1").Select

Sheets("CN_FR").Select
Range("A1").Select

'ActiveWorkbook.BreakLink Name:=FN1, Type:=xlExcelLinks

Application.Run "BLinks"

ActiveWorkbook.SaveAs Filename:="O:\Finance & Operations\Greater China Sharefolder\Templates\Daily Sales Report\China\2020\Report\" & Range("DD2").Text & "\FR\" & "CN Daily Sales Report_FRCN_" & Range("DD1").Text & ".xlsx"

End Sub

Sub CW()

Dim ARR1 As Variant
Dim FN1 As Variant

ARR1 = Array("CN_CW", "PY_CW")
'FN1 = "O:\Finance & Operations\Greater China Sharefolder\Templates\Daily Sales Report\China\2020\CN Daily Sales Report 2020_v1.42 - Master.xlsm"

Sheets(ARR1).Copy
Sheets(ARR1).Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False


Sheets("CN_CW").Select
Range("A1").Select

'ActiveWorkbook.BreakLink Name:=FN1, Type:=xlExcelLinks

Application.Run "BLinks"

ActiveWorkbook.SaveAs Filename:="O:\Finance & Operations\Greater China Sharefolder\Templates\Daily Sales Report\China\2020\Report\" & Range("DD2").Text & "\CW\" & "CN Daily Sales Report_Connected Watch_" & Range("DD1").Text & ".xlsx"

End Sub

Sub BLinks()

Dim uniqueName As Name
Dim extLink As Variant, arrayXValues() As Variant, arrayValues() As Variant
Dim wb As Workbook
Dim sh As Worksheet, sh_temp As Worksheet

Call turnOffThings
Set wb = ActiveWorkbook

For Each uniqueName In wb.Names
If isNameLinkOffWorkbook(uniqueName) = True Then
uniqueName.Delete
End If
Next uniqueName

For Each sh In wb.Worksheets
Next sh

If Not IsEmpty(wb.LinkSources(xlExcelLinks)) Then

For Each extLink In wb.LinkSources(xlExcelLinks)
wb.BreakLink extLink, xlExcelLinks
Next extLink
End If

Call turnOnThings

End Sub

Function isNameLinkOffWorkbook(namedRangeName As Name) As Boolean

isNameLinkOffWorkbook = False

If ActiveWorkbook.Names(namedRangeName.Name).RefersTo Like "*[[]*" Or ActiveWorkbook.Names(namedRangeName.Name).RefersTo Like "*\*" Then
isNameLinkOffWorkbook = True
End If

End Function

Sub turnOffThings()

Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual

End Sub

Sub turnOnThings()

Application.ScreenUpdating = True
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic

End Sub

 

Highlighted

@Miata118 

 

Nothing major pops up when I look at the code. And you mentioned you haven't change it so let's assume the code it right for now. 

I suspect you may have a mapped drive issue. Can you confirm you have access to this exact path: O:\Finance & Operations\Greater China Sharefolder\Templates\Daily Sales Report\China\2020\

This is used multiple times in the code and if it is only available on the other persons computer (the one who left), that might be your issue. Maybe that drive is mapped with a different letter on your computer? 

Also, confirm you are using a version of Excel that is 2007 or newer. I really hope for newer than that for security reason but that's for another day.