Sorting help

Page 1 of 1

1 Replies - 276 Views - Last Post: 14 July 2014 - 05:54 PM Rate Topic: -----

#1 vivibuy88  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 05-July 14

Sorting help

Posted 14 July 2014 - 05:49 PM

Please let me know which part I did wrong ?
Sorting error : Unable to cast object of type 'System.String' to type 'System.Array'.


  For row_csv = 3 To toLoop


            unmount = sheet.Cells(row_csv, 8).Value
            If (unmount = Nothing Or unmount = "") Then
                MsgBox(unmount)
                csv_location = sheet.Cells(row_csv, 4).Value
                MsgBox(csv_location)
                Array.Sort(csv_location)    ' Error found !
                csv_location.Sort(Key1:=sheet.Cells(row_csv, 4), Order1:=Microsoft.Office.Interop.Excel.XlSortOrder.xlAscending)
                csv_location_check = sheet.Cells(row_csv, 7).Value
                MsgBox("You are here 1")
            End If
Next 





Is This A Good Question/Topic? 0
  • +

Replies To: Sorting help

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9574
  • View blog
  • Posts: 36,262
  • Joined: 12-June 08

Re: Sorting help

Posted 14 July 2014 - 05:54 PM

Please do not create duplicate topics. Closing.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1