title: escaping variables in vba code
body: <p>Could some please help me to escape the variables in the function. I don't get it:</p>
  
  <pre><code>Cells(5, fieldextsales).FormulaLocal = "=SUMMEWENNS(Rawdata!K2:K" &amp; maxnumrows &amp; ";Rawdata!I2:I" &amp; maxnumrows &amp; ";""bezahlt"";Rawdata!A2:A" &amp; maxnumrows &amp; ";""&gt;= "&amp;DATWERT(""&amp; weekstart &amp;" 00:00")";Rawdata!A2:A" &amp; maxnumrows &amp; ";""&lt;= "&amp;DATWERT(""&amp; weekend &amp; " 23:59"))
  </code></pre>
  
  <p>EDIT
  The hardcoded working formula is this:</p>
  
  <pre><code>=SUMMEWENNS(Rawdata!K2:K3446;Rawdata!I2:I3446;"bezahlt";Rawdata!A2:A3446;"&gt;="&amp;DATWERT("18.03.2013 00:00");Rawdata!A2:A3446;"&lt;="&amp;DATWERT("24.03.2013 23:59"))
  </code></pre>
  
  <p>I just want to insert variables for the dates</p>
  
  <pre><code>"18.03.2013 00:00" =&gt; weekstart &amp;" 00:00"
  "24.03.2013 23:59" =&gt; weekend &amp; " 23:59"
  </code></pre>