title: Texttocolumn Excel using VBS
body: <p>Quick question from my end about using the Text to columns function in Excel via VBS.</p>
  <p>I have the following code below but I can't get it to run.
  It is getting stuck in the last line of code, any thoughts on how to pass it to excel?</p>
  <pre><code>Dim strfilepathcqr
  strfilepathcqr = &quot;C:FilepathExample&quot;
  
  Dim objExcel
  Set objExcel = CreateObject(&quot;Excel.Application&quot;)
  objExcel.Application.Visible = True
  objExcel.Application.DisplayAlerts = False
  
  Dim objWb
  Set objWb = objExcel.Workbooks.Open(strfilepathcqr)
  
  Set ws = objWB.Worksheets(1)
  
  Set objRange = ws.range(&quot;AY2:AY83221&quot;)
  Set objRange2 = ws.Range(&quot;AY2&quot;)
  
  objRange.select
  ObjRange.TextToColumns objRange2,1,1,False,False,False,False,False,False,Array(1, 2),True
  </code></pre>