title: VB.net copy and paste excel cell to elsewhere in the workbook
body: <p>So i am currently using Visual Studio to create a application that takes info out of an excel sheet and then does some calculations on the data and then pushes back to excel.</p>
  
  <p>This bit i have managed to do but the bit i am struggling on is using a 'Parameters' sheet. I want to be able to enter a formula into a cell in one sheet of the workbook and then paste that formula into another sheet but to have it updating,e.g. as the cells go down the formula changes like it would in excel. I used a manual work around by hard coding the formula and then having variable as the row number, however i want to be able to just change the formula in the excel sheet and then when the code runs it applies to the rest.</p>
  
  <p>Currently i have tried saving the cell value/text into a variable and then making the new cells equal that variable, however this then applies the same identical formula to the whole of the column(All required rows). </p>
  
  <p>What i am currently trying to do is paste the variable into the top row and then copy and paste that cell down to the last one,</p>
  
  <p>I have tried making the variable a formula but it evaluates the formula before it is equal to the variable and therefore just sets all the new cells to the formula answer, so i changed the cell to be text instead which then meant the formula did appear in the new cell however it was the identical formula for all cells.</p>
  
  <p>The copy code works as below </p>
  
  <pre><code>bjExcel.cells(rown, colval) = param1
  objExcel.cells(rown, colval).copy
  </code></pre>
  
  <p>This is working fine </p>
  
  <p>But when i use the below the paste won't work</p>
  
  <pre><code>Do Until rown = 10
  objExcel.cells(rown, colval).copy
  rown = rown + 1
  objExcel.cells(rown, colval).paste
  </code></pre>
  
  <p>Paste is not a recognized with the error:</p>
  
  <blockquote>
    <p>System.MissingMemberException: 'Public member 'Paste' on type
    'ApplicationClass' not found.'</p>
  </blockquote>