From: Craig Moran Date: 2006-09-21T21:25:12+09:00 Subject: ruby/win32ole Excel Move problem I have been trying to implement this Excel subroutine in Ruby, but am having trouble with the Move command. The real issue is with the "after:=Sheets()" portion of the command in the code below. Does anyone know how to get around this using Ruby and win32ole? This is what the code looks like in Excel VBA. All it does is sort the sheets of an Excel workbook by name. Thanks! Craig Sub Sheet_Sort() Dim shtCount As Integer shtCount = Sheets.Count For x = 3 To shtCount - 1 For i = 3 To shtCount - 1 If Worksheets(i).Name > Worksheets(i + 1).Name Then Worksheets(i).Move after:=Sheets(i + 1) End If Next i Next x End Sub