You can use the Run method to run an existing macro. E.g.,
XLAppRef.Run "Book1.xls!TheMacroName"
--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)
"Aaqib" <(E-Mail Removed)> wrote in message
news:5E774E72-4F8D-4C13-A914-(E-Mail Removed)...
> yes, i want both
> 1) Activate and run the macro in the Excel workbook from C#,
> 2) Use the functionality of the macro in your C# program?
> please answer whatever way you understand instead of re-asking. 
>
> "(E-Mail Removed)" wrote:
>
>> What exactly doy ou mean by using the macro in C#.net? Do you want to
>> activate or run the macro in the Excel workbook from C#, or do you
>> want to use the functionality of the macro in your C# program?
>>
>>
>> On Oct 30, 8:04 am, Aaqib <Aa...@discussions.microsoft.com> wrote:
>> > i have macro in excel sheet in which data is sorted and some other
>> > functions.
>> > i want to use that macro in C# .net
>> > how can i use that.
>>
>>
>>