السلام عليكم
لدي الكود التالي اقوم باستخدتمه لتشغيل اكثر من كود في نفس الوقت
Sub new_Change()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
pt = ActiveWorkbook.Path
NextFile = Dir(pt & "\")
Do While NextFile <> ""
If NextFile = "M.xlsb" Then GoTo 10
Workbooks.Open Filename:=pt & "\" & NextFile
Application.Run ("Macro01")
Application.Run ("Macro1")
Application.Run ("Macro2")
Application.Run ("Macro3")
Application.Run ("Macro4")
Application.Run ("Macro5")
Application.Run ("Macro6")
Application.Run ("Macro7")
Application.Run ("Macro8")
Application.Run ("Macro9")
Application.Run ("Macro10")
Application.Run ("Macro11")
Application.Run ("Macro12")
Application.Run ("Macro13")
Application.Run ("Macro14")
Application.Run ("Macro15")
Application.Run ("Macro16")
Application.Run ("Macro17")
Application.Run ("Macro18")
Application.Run ("Macro19")
Application.Run ("Macro20")
Application.Run ("Macro21")
Application.Run ("Macro22")
Application.Run ("Macro23")
Application.Run ("Macro24")
Application.Run ("Macro25")
Application.Run ("Macro26")
Application.Run ("Macro27")
Application.Run ("Macro28")
Application.Run ("Macro29")
Application.Run ("Macro30")
Application.Run ("Macro31")
Application.Run ("Macro32")
Application.Run ("Macro33")
Application.Run ("Macro34")
Application.Run ("Macro35")
Application.Run ("Macro36")
Application.Run ("Macro37")
Application.Run ("Macro38")
Application.Run ("Macro39")
'=========================
ActiveWorkbook.Save
ActiveWorkbook.Close
10 NextFile = Dir()
Loop
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
العملية باكملها تاخذ كثيرا من الوقت
و عندما اقوم بتشغيل الاكواد يدويا واحدا تلو الاخر تصبح العملية اسرع
فهل من خطا معين في الكود
او من طريقة تقوم بتفريغ الرامات عند تشغيل الكود التالي ,, حيث ان الاكواد ليست مرتبطة ببعضها