aryank2000
04-21-2016, 09:54 AM
I wrote a macro which deletes blank rows and saves the file into a csv file. The name of the xls file which has macro is MacroFile.xls. I want to run this macro on an excel file (Sourcefile.xls). So when I open the macrofile.xls, the macro should run on Sourcefile.xls. I tried using Application.Run("SourceFile.XLS!MyMacroName") in Macrofile.xls. I get error. Any help would be appreciated. Here is what i have in sourcefile.xls.
sub promacro()
' code here
end sub
Sub runmacro()
Application.Run ("C:\folder\Macrofile.XLS!promacro")
End Sub
Can someone suggest what am i missing?
sub promacro()
' code here
end sub
Sub runmacro()
Application.Run ("C:\folder\Macrofile.XLS!promacro")
End Sub
Can someone suggest what am i missing?