I need to find a way to sort based on ascending numbers: I recorded a macro in excel however i can;t seem to put it into .net code. The code below is from the recorded macro
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 08/29/2005 by colindolcetti
'
'
Range("A1:K194").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
This code below here is the .net code that i would like to put my excel code into:
For intLoop = 0 To Me.nextStepArrList.Count - 1
xlsheet.Cells(intRowLoc, intCurrentCol) = CType(opcodesarrlist(intLoop), OpCodes).opcode
Dim xlRange As Excel.Range
xlRange = xlsheet.Cells(intRowLoc, intCurrentCol)
xlRange.Select()
With CType(xlApp, Excel.Application).Selection.interior
If CType(opcodesarrlist(intLoop), OpCodes).opcode Then
.xlascending()
End If
End With
intRowLoc += 1
Next
If i use this code it error out what i'm a missing?
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 08/29/2005 by colindolcetti
'
'
Range("A1:K194").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
This code below here is the .net code that i would like to put my excel code into:
For intLoop = 0 To Me.nextStepArrList.Count - 1
xlsheet.Cells(intRowLoc, intCurrentCol) = CType(opcodesarrlist(intLoop), OpCodes).opcode
Dim xlRange As Excel.Range
xlRange = xlsheet.Cells(intRowLoc, intCurrentCol)
xlRange.Select()
With CType(xlApp, Excel.Application).Selection.interior
If CType(opcodesarrlist(intLoop), OpCodes).opcode Then
.xlascending()
End If
End With
intRowLoc += 1
Next
If i use this code it error out what i'm a missing?