Thank you for your reply. I have added one of my macros which sometimes encounters this error. (as I told, this issue is not related for a particular macro. And strangely it sometimes even occurs when I try to copy (move) sheets manually (without using macro))
Option Explicit
Sub saveboursview()
Dim ws0 As Workbook
Dim name0 As String
Application.DisplayAlerts = False
Set ws0 = ActiveWorkbook
Windows("tempalatecodal.xlsb").Activate
UserForm1.Show
name0 = Range("a1").Value
ws0.Activate
ActiveSheet.Copy Before:=Workbooks("tempalatecodal.xlsb").Sheets("u serform")
ActiveSheet.name = name0
Application.Run "'Personal.xlsb'!bourseview"
Application.Run "'Personal.xlsb'!replace0"
ws0.Close
Application.DisplayAlerts = True
End Sub
Last edited by soroush.kalantari; 10-17-2023 at 07:51 PM.
|