vba - Run-time error '50290': Application-defined or object-defined error Excel -


i've use asynchronous winhttp in excel vba shoot out lot of requests website. after reply received, module called writes sheet.

generally works fine, if user not have focus on excel, error out "run-time error '50290': application-defined or object-defined error".

it errors out on line:

pcol = thisworkbook.worksheets("wha").cells.find("producta").column 

i tried following syntaxes well:

pcol = sheet3.cells.find("producta").column pcol = sheet3.rows(5).find("producta").column pcol = sheet3.rows(5).find(what:="producta").column pcol = sheets("wha").cells.find(what:="producta", lookat:=xlwhole, lookafter:=sheet3.cells(5, 1)).column 

all no avail...

i know can force focus on excel in vba,but ideally, don't mind if macro runs in background while user getting smarter on stackoverflow.com in mean time :-)

does have suggestions on how overcome this, please? thanks!

appactivate "microsoft excel" 

or store wb when know have focus , active after


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -