title: Excal VBA - Vlookup macro dropdown - out of stack space
body: <p>I have an excel sheet, from a dropdown list I will have numbers of items to select.</p>
  
  <p>After selecting specific item, a specific macro is run that will paste vlookup formulas to the range of cells.</p>
  
  <p>My workbook VBA looks as follows:</p>
  
  <pre><code>    Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
  
  Select Case Range("B2")
  
  Case "Company 1"
  Call Company1
  
  Case "Company 2"
  Call Company2
  
  End Select
  End Sub
  </code></pre>
  
  <p>And my macros look as follows</p>
  
  <pre><code>Sub Company1()
  Range("D7:D14").Formula = "=VLOOKUP(B7,'SheetLocation\[Sheet1.xls]Sheet1'!$A$6:$E$93,3,FALSE)"
  End Sub
  
  Sub Company2()
  Range("D7:D14").Formula = "=VLOOKUP(B7,'SheetLocation\[Sheet2.xls]Sheet2'!$A$6:$E$93,3,FALSE)"
  End Sub
  </code></pre>
  
  <p>With such macros everytime I select the value form dropdown list my excel hangs up with error Runtime error 28 - Out of stack space.</p>
  
  <p>Need your help guys.</p>