yes sheet name is correct.
i pasted all code again, can you check it once.
Windows(“SourceData.xlsx”).Activate
Sheets(“AN”).Select
Range(“C7:M34”).Select
Selection.Copy
Windows(“Source.xlsm”).Activate
Sheets(“AN”).Select
Range(“C7:M34”).Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Windows(“SourceData.xlsx”).Activate
Selection.Copy
Windows(“Source.xlsm”).Activate
Range(“C7”).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=-27
Range(“A1:M1”).Select
Sheets(“CC”).Select
this same code writing multiple times for all sheets i have in excel file by changing the sheet name.
Pls check Macro enable:
To enable Macro settings in Excel > navigate to the “File” tab, select “Options”, then choose “Trust Center” followed by “Trust Center Settings”; within the Macro Settings section, select the desired level of macro enablement (usually “Enable all macros”) and click “OK”
Hi @Rama_Krishna_Gadde
The HRESULT: 0x800A9C68 exception occurs due to issues with Excel COM interactions, such as improper initialization, unclosed Excel instances, recovery dialogs blocking actions, or multiple instances of Excel running simultaneously.
or Excel being busy due to auto-syncing with OneDrive
when you get the error try to open in debug on macro and check which line it is failing
subscription out of range comes when the sheet or range are invalid…
it might be because of activates as well as I see you using two excels but no open command is present