vkrisz81 Posted June 23, 2022 Share Posted June 23, 2022 hello i have a read/write program, but randomly it goes to fail: ==> The requested action with this object has failed.: $s4seek=$o_filltable.sheets(1).cells($row,2).value $s4seek=$o_filltable.sheets(1)^ ERROR the problem occurs randomly, various places.. how can i fix it? if a row is selected and sheet saved, program breaks.. sometimes, here and later on other cell, it breaks.. what is the good way to fix it? its unstable.. Link to comment Share on other sites More sharing options...
vkrisz81 Posted June 23, 2022 Author Share Posted June 23, 2022 ok i give up.. this is unhandable.. sometimes 4 row passes, sometimes 44.. i put sleep for dealy, worse.. its unacceptable.. Link to comment Share on other sites More sharing options...
vkrisz81 Posted June 23, 2022 Author Share Posted June 23, 2022 pls fix it somehow!!!!!!!!!!!! Link to comment Share on other sites More sharing options...
vkrisz81 Posted June 23, 2022 Author Share Posted June 23, 2022 i tried disable screen refresh, independ... trash Link to comment Share on other sites More sharing options...
Danp2 Posted June 23, 2022 Share Posted June 23, 2022 You haven't posted any code that we can run to reproduce the issue. Therefore, I can only assume that it is your code that is "trash". 🤨 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
water Posted June 23, 2022 Share Posted June 23, 2022 You are talking about Excel? Post your Excel. Post your script. Post the data you want to write to Excel. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
vkrisz81 Posted July 3, 2022 Author Share Posted July 3, 2022 On 6/23/2022 at 9:45 PM, Danp2 said: You haven't posted any code that we can run to reproduce the issue. Therefore, I can only assume that it is your code that is "trash". 🤨 yes of course this is the easiest way to do but, really, what needed if a script sometimes works, sometimes not on the same source data..? do you think is there needed any extra description?:D i mean, if there is a method how a statement works, it should always work or always not work on same data. but if without changing source it is randomly bugged, whispers to me something similar is the fail not in my script what is not changing. but thanks your hard work in thinking about possible errors helped lot ^^ Link to comment Share on other sites More sharing options...
vkrisz81 Posted July 3, 2022 Author Share Posted July 3, 2022 On 6/23/2022 at 10:29 PM, water said: You are talking about Excel? Post your Excel. Post your script. Post the data you want to write to Excel. sry i cant post here because it contains private datas for a nonstandard company :S the event is : program_4_filler_002_001.au3" (95) : ==> The requested action with this object has failed.: $s4seek=$o_filltable.sheets(1).cells($row,2).value $s4seek=$o_filltable.sheets(1)^ ERROR and the problem is, i dont know what is the exact problem for excel udf with this cell, or, if i put an if @error, why program ignors it and exit? $o_filltable.sheets(1).cells($row,$oszlop+$isheetnum)=$a_sheetdata[$pos][3] if @error Then l("error at "&@ScriptLineNumber) ;~ $o_filltable.screenupdating=True ;~ exit so this part is not executed, however there is on error part.. so i dont know what is the problem with given "object", and why does not run the error handle part od the script if an error occurs.. thanks you S: and the mainly problem is, sometimes it works sometimes not. without any change on source or.. the program. Link to comment Share on other sites More sharing options...
vkrisz81 Posted July 3, 2022 Author Share Posted July 3, 2022 \program_4_filler_002_001.au3" (95) : ==> The requested action with this object has failed.: l("$o_filltable.sheets(1).cells($row,2).value="&$o_filltable.sheets(1).cells($row,2).value) l("$o_filltable.sheets(1).cells($row,2).value="&$o_filltable.sheets(1)^ ERROR here you can see it can not refer to cell of the sheet. but the cell is there.. clearly. Link to comment Share on other sites More sharing options...
vkrisz81 Posted July 3, 2022 Author Share Posted July 3, 2022 l("$o_filltable.sheets(1).cells($row,2).value="&$o_filltable.sheets(1).cells($row,2).value) so when i print its value this link works.. 18:54:32 $o_filltable.sheets(1).cells($row,2).value=RPLO400068 "\program_4_filler_002_001.au3" (101) : ==> The requested action with this object has failed.: $s4seek=$o_filltable.sheets(1).cells($row,2).value $s4seek=$o_filltable^ ERROR in next line when i try to assign same cell value to a variable, it gives error. nonsense... Link to comment Share on other sites More sharing options...
vkrisz81 Posted July 3, 2022 Author Share Posted July 3, 2022 problem solved by making complete different method. Link to comment Share on other sites More sharing options...
water Posted July 3, 2022 Share Posted July 3, 2022 (edited) If you run into similar problems in the future: Add a COM error handler to your script. Details can be found in the help file for ObjEvent. A COM error handler gives you detailed information about the error. Pass as much information as possible. We still don't know if you are talking about Excel or another program. We do not know if you are using the Excel UDF, your directly access all COM objects or both Anonymize code and data and post here so we can play with it. This speeds up the whole process Please be patient: "its unacceptable..", "its unacceptable.. " etc. every 2-4 minutes doesn't help very much. We are all volunteers. And forum FAQ tells you to wait at least 24 hours before bumping a thread. You are here > 12 years so you know how the forum works. Just my 2 cents worth Edited July 3, 2022 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
vkrisz81 Posted July 3, 2022 Author Share Posted July 3, 2022 (edited) so i use excel udf, and after i made a diffrernt method of working with arrays, program generates same problem.. on other part of program but on same place: accessing a worksheet().cells still same error. so it seems i cant use excel udf, because if i outplay somewhere, udf generates another place.. while i use excel udf.. i dont know still how other wy can i solve my tasks, but it seems disabled to using excel udf. i know only this. and this is unacceptable, something is wrong, if i solve it, program generates same problem on place where was correct... it seems does no matter where i try to handle error, somewhere never will work. sad but its tested around 200times.. the whole process is: i have a sourceexcel, i read it to an array by using excel range read i have another workfile excel, where i must insert to, seeking by the second column datalist.. sorted.. filtered.. etc. so i applied a simple arraysearch to find the requested element in the first source table and put the value into the workfile, but every time i try to access workfile cell it generates random place object error.. cell is there, program reached 30000000times before, once it thinks it wont. if i make an error handling, it drop this error on other place in program.. the result is, i cant use excel udf. unstable.. thanks new result: the row which generates error: "167: $o_filltable.screenupdating=True" ;after filling switch back screenupdate. the errormessage: program_4_filler_002_002.au3 (167) : ==> COM Error intercepted ! err.number is: 0x80020006 err.windescription: unknown name err.description is: err.source is: err.helpfile is: err.helpcontext is: err.lastdllerror is: 0 err.scriptline is: 167 err.retcode is: 0x00000000 Edited July 3, 2022 by vkrisz81 Link to comment Share on other sites More sharing options...
water Posted July 3, 2022 Share Posted July 3, 2022 Sorry, but instead of whining, you should give us the information I quoted. If that is not possible, then your only option is to find the error yourself. In that case, I'm out. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
vkrisz81 Posted July 3, 2022 Author Share Posted July 3, 2022 17 minutes ago, water said: Sorry, but instead of whining, you should give us the information I quoted. If that is not possible, then your only option is to find the error yourself. In that case, I'm out. instead of whining thats correct :d i typed what com errors come but, newer error comes.. program_4_filler_002_002.au3 (143) : ==> COM Error intercepted ! err.number is: 0x80020008 err.windescription: wrong variable type err.description is: err.source is: err.helpfile is: err.helpcontext is: err.lastdllerror is: 0 err.scriptline is: 143 err.retcode is: 0x00000000 "\program_4_filler_002_002.au3" (143) : ==> Variable must be of type "Object".: $o_filltable.sheets(1).cells($row+1,$oszlop+$isheetnum).value=Number($a_sheetdata[$pos][3]) $o_filltable.sheets(1)^ ERROR which is dont problem for previous cell or next cell.. still excel still excel udf thanks Link to comment Share on other sites More sharing options...
water Posted July 4, 2022 Share Posted July 4, 2022 (edited) „unknown name“ means: The property/method you use does not exist. Check the MS documentation for the correct name.Edit: Seems $o_filltable is a workbook object. Property ScreenUpdating is only valid for an Excel application object. Variable must be of type "Object" means that the variable isn’t an object. Use ConsoleWrite("IsObj : " & IsObj($o_filltable) &CRLF) ConsoleWrite("ObjName: " & ObjName($o_filltable) & @CRLF) to check the variable type. Edited July 4, 2022 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
vkrisz81 Posted July 4, 2022 Author Share Posted July 4, 2022 10 hours ago, water said: „unknown name“ means: The property/method you use does not exist. Check the MS documentation for the correct name.Edit: Seems $o_filltable is a workbook object. Property ScreenUpdating is only valid for an Excel application object. Variable must be of type "Object" means that the variable isn’t an object. Use ConsoleWrite("IsObj : " & IsObj($o_filltable) &CRLF) ConsoleWrite("ObjName: " & ObjName($o_filltable) & @CRLF) to check the variable type. ok, i set it on $o_excel object, screenupdating=false. still cells are changing during program runs.. i mean WHY? i ran program twice. once i focused window, once not. not focused ran perfectly, when i focused filltable, program halted. Link to comment Share on other sites More sharing options...
vkrisz81 Posted July 4, 2022 Author Share Posted July 4, 2022 l(IsObj($o_filltable.sheets(1).cells($row+1,$oszlop+$isheetnum))) $o_filltable.sheets(1).cells($row+1,$oszlop+$isheetnum).value=Number($a_sheetdata[$pos][3]) i check it if its an object, program says 1, which means yes it is. next line:$o_filltable.sheets(1).cells($row+1,$oszlop+$isheetnum).value=Number($a_sheetdata[$pos][3]) $o_filltable.sheets(1).cells($row+1,$oszlop+$isheetnum)^ ERROR variable must be an object.. is it a bug? Link to comment Share on other sites More sharing options...
water Posted July 5, 2022 Share Posted July 5, 2022 Please, when you reply to a post, do not click on quote button but simply add your reply at the end of the thread. I know what I have posted before. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted July 5, 2022 Share Posted July 5, 2022 is this the whole statement? 11 hours ago, vkrisz81 said: l(IsObj($o_filltable.sheets(1).cells($row+1,$oszlop+$isheetnum))) Seems something is missing at the start. BTW: When checking for an object make sure you check the correct object: IsObj($o_filltable) returns a workbook object IsObj($o_filltable.sheets(1)) returns a worksheet object IsObj($o_filltable.sheets(1).cells($row+1,$oszlop+$isheetnum))) returns a range object Make sure you check the correct object. Which one can be seen in the error message you get. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - 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