title: Auto Fill till data ends in column B VB.Net
body: <p>I have little problem in VB.net. I have excel file with data in column A Column B. I want to write value as "USD" in column C till the value end in the column B or Column A.</p>
  
  <p>In Excel VBA, I use </p>
  
  <pre><code>Range ("C2") = "USD"
  Range("C2").Copy Range("C3", Cells(Rows.Count, "B").End(xlUp).Offset(0, 1))
  </code></pre>
  
  <p>This fills USD till the value end in column B.</p>
  
  <p>Can anyone help me how to get this in VB.Net?</p>
  
  <p>I have tried something like this in VB.net.</p>
  
  <pre><code>With objworkbook2
  Dim my_variable As String
  Dim Worksheets = objworkbook2.Worksheets("Test USD")
  my_variable = "USD"
  if Worksheets.Cells(2, 1).Value &gt;= 1 Then 'Cell A9 contains Number
  Worksheets.Cell(2, 3).Value = my_variable
  End if
  End With 
  </code></pre>
  
  <p>Please help me how to loop this in VB.Net</p>