tonn333 Posted July 26, 2019 Author Share Posted July 26, 2019 15 hours ago, water said: You do not find this error codes in the help file because they are not AutoIt or SciTE related. This are pure Windows error codes. Start Windows calculator Switch to programmer mode copy the decimal error code (e.g. -2147352570) to the calculator and retrieve the hex representation Google for "HRESULT 0x80020006" to get the error description I copied your script, modified the workbook name, selected a cell in Excel and then used Ctrl+1 to retrieve the value of the selected cell. Which cell did you select (e.g. "A1) and which value do you expect? is it a plain value or a formula in the cell? I made a unlisted youtube video showing exactly what I did. Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted July 26, 2019 Share Posted July 26, 2019 (edited) @tonn333 Before the MsgBox that displays the value of the active cell, add this line of code: If @error Then Exit MsgBox("_Excel_RangeRead ERR: " & @error) because some error occurred (and the return value of 0 confirms this theory), that something went wrong Edited July 26, 2019 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
tonn333 Posted July 26, 2019 Author Share Posted July 26, 2019 21 minutes ago, FrancescoDiMuro said: @tonn333 Before the MsgBox that displays the value of the active cell, add this line of code: If @error Then Exit MsgBox("_Excel_RangeRead ERR: " & @error) because some error occurred (and the return value of 0 confirms this theory), that something went wrong Thank you. I added this: If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Error", "_Excel_RangeRead ERR: " & @error & ", @extended = " & @extended) This is the error message I got: Help file says: @error: 3 - $vRange is invalid. @extended is set to the COM error code -2147352567 in hex is 80020009 Googling "HRESULT 80020009" gave me nothing I can understand. How should I proceed? Link to comment Share on other sites More sharing options...
water Posted July 26, 2019 Share Posted July 26, 2019 Which version of Excel do you run? Can you please replace all "Local" variable definitions in the main script with "Global" and try again? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted July 26, 2019 Share Posted July 26, 2019 Can you please add the following line after _Excel_Open: If @error Then Exit MsgBox("_Excel_Open ERR: " & @error) My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
tonn333 Posted July 26, 2019 Author Share Posted July 26, 2019 17 minutes ago, water said: Can you please add the following line after _Excel_Open: If @error Then Exit MsgBox("_Excel_Open ERR: " & @error) Excel version 1906 (Build 11727.20244) Did all that. Heres a video to show what happened. As you can see, I copied your code but for some odd reason it showed a bunch of errors but when I copied from existing code it did not show the same errors. Still doesn't work. Link to comment Share on other sites More sharing options...
water Posted July 26, 2019 Share Posted July 26, 2019 26 minutes ago, tonn333 said: Excel version 1906 (Build 11727.20244) You seem to use Office 365 ProPlus. Do you run the cloud version or on premise? I'm still on Office 2016 so know near to nothing about Office 365 My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
tonn333 Posted July 26, 2019 Author Share Posted July 26, 2019 13 minutes ago, water said: You seem to use Office 365 ProPlus. Do you run the cloud version or on premise? I'm still on Office 2016 so know near to nothing about Office 365 not the cloud version. Is there hope for me? Link to comment Share on other sites More sharing options...
water Posted July 26, 2019 Share Posted July 26, 2019 Sure. There must be some bug somewhere. Can you please replace function _DoWork? Func _Dowork() ; $sActiveCell = _Excel_RangeRead($oWorkbook, Default, $oExcel.ActiveCell) Local $sActiveCell = $oExcel.ActiveCell.Value MsgBox($MB_SYSTEMMODAL, "Info", "Value of active cell: " & $sActiveCell) EndFunc ;==>_Dowork My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
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