A few months ago i wrote a script something very simple. Opening an exel file, getting the active cell contents and copying and pasting those contents into a web browser. I believe in the interim i have updated to Office 2007, and am no longer able to use the active cell command. I have tried this on another computer and get the same problem. Does anyone know what could be causing this. Ideally I'd like to setup a hot key that automates a few processes where the first processess is grabbing the contents of the active cell. Below is a few lines of simple code and the error message. I make sure that before i run the script I open excel, and click on a cell to ensure that one cell is active.
$oExcel = _ExcelBookAttach("C:\Golden Medical Billing\Clients\Dr. Meglio\Aging Reports\2012\Meglio Aging 03-08-12.xlsx") If @error = 1 Then MsgBox(0, "Error code is: "&@error, "Could not Attach Excel Book returning: " &$oExcel) $oActiveCell = $oExcel.ActiveCell.value
This is the error message:
C:\Users\mike\Documents\AutoIt\test.au3 (12) : ==> The requested action with this object has failed.:
$oActiveCell = $oExcel.ActiveCell.value
$oActiveCell = $oExcel.ActiveCell^ ERROR