<tbody>
[TD="class: votecell"][/TD]
[TD="class: postcell"] Thanks in advance.
I'm trying to call a function using a variable name. It's throwing the below error
The macro 'testfunc' cannot be found. Resume without error
I tried below 3 statements but all are throwing the same error.
<code>sFuncName = "testfunc"
ExtractData = Application.Run("Sheet.xls" & sFuncName, s1, s2)
ExtractData = Application.Run(sFuncName, s1, s2)
ExtractData = CallByName("Sheet.xls", sFuncName, VbMethod, s1, s2) </code>
Note that the <code>sFuncName</code> returns a value & I have 2 Excels opened at that moment, I'm trying to copy data from one Excel to other.
Please help me in achieving this.
[/TD]
</tbody>