ImageEngine 0 Posted September 10, 2007 (edited) Hi All Just starting to Au3 and cant get over the bug in this line $oExcel.activesheet.Range("B2:G2", $oExcel.activesheet.Selection.End(xlDown)).Select Of course 'xldown' needs to come from somewhere but I cant find a simple explanation; please forgive my newbyness! As illustrated, I simply want to select from the first part down to the end of the data. Thanks in advance for any help Regs Mark PS Of course I have established the object etc so everything works when I use; $oExcel.activesheet.Range("B2:G2").select Its just that I want to understand how the selection end works from auit. Edited September 10, 2007 by ImageEngine Share this post Link to post Share on other sites
James 377 Posted September 10, 2007 Why dont you use AutoIt3? Many bug fixes have been fixed etc, and the new syntax is great. Check it out, then post in the General Help and Support forum. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Share this post Link to post Share on other sites
GMK 25 Posted September 10, 2007 Here is one way: $oExcel.ActiveSheet.Range("B2:G" & $oExcel.ActiveSheet.UsedRange.Rows.Count).Select Share this post Link to post Share on other sites
RDSchaefer 0 Posted September 11, 2007 Google for "Excel VBA constants" Ralph Share this post Link to post Share on other sites
GMK 25 Posted September 11, 2007 To do it your way, you may want:Const $xlDown = -4121 $oExcel.ActiveSheet.Range("B2:G2", $oExcel.ActiveSheet.Selection.End($xlDown)).Select ;(Untested) Share this post Link to post Share on other sites
Ktj 0 Posted September 11, 2007 Look into help file for examples on gettings range and height on fixed sized boxes Share this post Link to post Share on other sites