martmeister Posted February 7, 2009 Posted February 7, 2009 Below is part of my code. The problem is that the Excel read cell command is not reading the cell. What I'm wanting to do is for whatever the number 1-10 in the cell, Autoit will determine from # to run this macro/ or what this ... I have tried lots of things and I am still getting stuck in this same situation.. can some please help .. . . . $oExcel = _ExcelBookOpen("C:\\ALL.xlsm") $val = _ExcelReadCell($oExcel, "DU", 19) ; looks in cell to determine value for if then statement If $val = 1 then Send('!({F8})'); this runs a macro d.h. Send("{TAB}") Send("{DOWN}") Send("{ENTER}") ElseIf $val = 2 Then Send('!({F8})') Send("{TAB}") Send("{DOWN 4}") Send("{ENTER}") . . . .
nfaustin Posted February 7, 2009 Posted February 7, 2009 Try using number instead of Letter:_ExcelReadCell($oExcel, 1, 1)BTW:I suspect your parameter doesn't match._ExcelReadCell($oExcel,"DU", 1)Please double check this expression. [font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]
martmeister Posted February 7, 2009 Author Posted February 7, 2009 Try using number instead of Letter: _ExcelReadCell($oExcel, 1, 1) BTW: I suspect your parameter doesn't match. _ExcelReadCell($oExcel,"DU", 1) Please double check this expression. I double checked it and it is correct
nfaustin Posted February 7, 2009 Posted February 7, 2009 Your parameter below is wrong. You only specify the column. _ExcelReadCell($oExcel, "DU", 1) If you using Range method, it should specify the ColumnRow. See below: _ExcelReadCell($oExcel, "DU1", 1) where the 'DU' is Column and 1 is row number. Try it. [font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now