How to execute macro of other workbook in the present workbook, during automation

excel
uiautomation

#1

Hi,

I want to execute macro which is other workbook(excel), In the current workbook. I wrote a macro for deleting rows from 1 to 11. Here is the code

Sub Macro1()
Rows(“1:11”).EntireRow.Delete
End Sub
This code is in my Add.xlsm file.

I need to execute this code for each and every excel file that I download during automation. I tried executing macro but it is not working fine. Can any one provide any better solution.
Thanks and Regrds,
M.Srikanth


#2

Hi,
Your question is answered here. You can call macro from any workbook.