Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Selecting excel cell

$
0
0
I ran into a little puzzle;

Func selectCell()
$Row = GUICtrlRead($locateRowInput)
$Column = GUICtrlRead($locateColumnInput)
$oExcel.Range($oExcel.Cells($Row, $Column), $oExcel.Cells($Row, $Column)).Select
EndFunc
Does not work

Func selectCell()
$Row = GUICtrlRead($locateRowInput)
$Row +=1;not sure why I had to do this, but it otherwise does not work
$Row -=1
$Column = GUICtrlRead($locateColumnInput)
$Column +=1
$Column -=1
$oExcel.Range($oExcel.Cells($Row, $Column), $oExcel.Cells($Row, $Column)).Select
EndFunc
Does work

For lack of knowing better, I've called this sort of thing "a layer of seperation".
I would like to leave that "lack of knowing better" thing in the past.
Can anyone explain?

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>