excel - Fails to update on cell change from outside source (OPC) -
i trying use vba store values on spreadsheet plc via rslinx data link. code reads cell has data link inserted , vba used perform analysis of data. wrote code tool aid in troubleshooting problems but, when initiated it, worked appears 'one scan' stopped updating. stripped code down bare bones read-and-relay set analyze how excel 2010 handling requests. set data linked cell, second cell equal data linked cell, , third cell relaying information second cell via vba code below. data link cell updates fine data on plc changes, second cell reads data without problem , can handle data formulas changes, vba cell not displaying anything. when second cell doubleclicked , enter key pressed, vba cell updated , displayed value shown in second cell failed continue update after that. used vba target data linked cell , got same result. not vba expert , usually, program in c++. may have bad interpretation of of commands below. please descriptive , thank you.
the data link is
=rslinx|dmontopic_1!'ia1_2,l1,c1'
code:
private sub worksheet_change(byval target range) dim part range set getto = range("f2") set part = range("d2") if not application.intersect(part, range(target.address)) nothing getto.value = target.value application.screenupdating = true end if end sub
Comments
Post a Comment