ojef1 0 Posted March 17, 2011 Is there such a thing? I want to store the row number of whatever cell i happen to be in. This is kind of the idea, unfortunately "Activecell.Row" is a VBA command, not autoit. To make it simpler, I could even write the row numbers 1-whatever into a column...but even then I can't figure out how to extract that into an autoit variable. #include <Excel.au3> AutoItSetOption("SendKeyDelay", 500) $oExcel = _ExcelBookNew() Send("^g") ;go to cell Send("e4") ;random cell selection Send("{ENTER}") $Row = $oExcel.Worksheets(1).Activecell.Row ;would like this to equal 4 (or whatever row it happens to be) ConsoleWrite("Row: " & $Row "{ENTER}") Share this post Link to post Share on other sites
MrMitchell 16 Posted March 17, 2011 If you're strictly looking for just the row of the selected cell... $sRC= $oExcel.ActiveCell.Address $aRow = StringRegExp($sRC, "\$\w*\$(\d*)", 3) $iRow = $row[0] It's not the best way to go, there are other better ways to write it up but you get the idea. You can also have the .Address method return a different style of address, it's in the MSDN documentation. Share this post Link to post Share on other sites
PsaltyDS 39 Posted March 17, 2011 ActiveCell applies to the application object, try: $Row = $oExcel.Application.Activecell.Row Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites