How to call another function from within macro function in Ribbon Class

Jul 30, 2014 at 2:50 PM
Status : Newbie.
using : C#, .Net 4.5

I have a situation where 2 buttons do independent functionality to a cell. But in one case button 2 should call button 1 after it has done its job.

button1...... in dna is like ..... onAction="CalulateCellData"
button2....... in dna is like......onAction='RunTagMacro' tag='ProcessData'

It works fine if I click the buttons from ribbon one after the other.
And one is macro and other iRibbon handler c# function

But how do I call it from within the function ?
// ----------------------
// C# i have something like this

 public void OnLoad(IRibbonUI ribbon)
        {
            MyRibbonUI = ribbon;
        }

public static void CalulateCellData(IRibbonControl control){

            // do some update to cell.
            
        }
        
[ExcelFunction(IsMacroType = true)]
        public static string ProcessData()
        {
            string sReuslt="somestatus";
            // do some work.
            //now it should fire the button CalulateCellData
            
            How do i call it  ??????
            CalulateCellData(MyribonUI); __<------- Error__ 
            
            return sResult;
        }