View Single Post
 
Old 10-16-2023, 09:48 PM
soroush.kalantari soroush.kalantari is offline Windows 10 Office 2016
Competent Performer
 
Join Date: Jun 2021
Posts: 124
soroush.kalantari is on a distinguished road
Default

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.
Reply With Quote