Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK. I've got a feeling that I'm going to feel like an idiot when someone
tells me what I'm doing wrong, but I am having trouble sorting rows in VBA. Consider the following code snippet: Dim intFirstRow, intSecondRow as Integer intFirstRow = 9 intSecondRow = 15 With ActiveSheet .Rows(intFirstRow, intSecondRow).Sort End With I keep getting run-time error 1004 which says "Application-defined or object-defined error", which seems to mean: Something is wrong. VBA's not sure what it is, but something is definitely wrong. Alternatively, I tried the line: .Rows(.Rows(intFirstRow),.Rows(intSecondRow)).Sort I got the same error. Can anyone point me in the right direction? Thanks in advance!!! -- Kevin |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sorting out rows | Excel Worksheet Functions | |||
Sorting rows into a row | Excel Discussion (Misc queries) | |||
Sorting Rows | Excel Worksheet Functions | |||
Sorting rows | Excel Worksheet Functions | |||
[sorting rows] | Excel Worksheet Functions |