title: excel macro calling another excel macro in vba
body: <p>I have made a macro that calls another macro saved on my shared drive. I have taken the help from the suggestions given in the previous question I asked. It is working on the files that are on my local drive, but as soon as I open it from a file from the shared drive it stops working.</p>
  
  <p>The macro name is <code>mymacro.xla</code></p>
  
  <p>These are the codes:</p>
  
  <pre><code>Dim i As AddIn
  
  Set i = Application.AddIns.Add("M:\nit\USER\nitin kumar\NQK\macro\run1.2.xla", True)
  
  i.Installed = True
  </code></pre>
  
  <p>I have created a button whose codes is given below:</p>
  
  <pre><code>Dim CoBa As CommandBar
  Dim Ctlconst As CommandBarControl
  On Error Resume Next
  
  Set CoBa = Application.CommandBars.Add(Name:="Quote Daily Report", temporary:=True)
  
  With CoBa
      Set Ctlconst = .Controls.Add(Type:=msoControlButton)
  
      With Ctlconst
          .Caption = "Lexington Macro"
          .Style = msoButtonIconAndCaptionBelow
          .OnAction = "Accounts_Summary"
          .FaceId = 483
          .TooltipText = "NITIN"
      End With
      .Visible = True
      .Position = msoBarBottom
  End With
  </code></pre>
  
  <p>It's not working any suggestions would be of great help.</p>