I have a graphic scheme in Excel that is done by means of conditional formatting (see figure below), that is, in colored cells there is no content, only the background colors are changed based in values from other cells.
ThedashedbluelineismadebyaroutineinVBA(theconnectionsarecomplextomakethebordersalsobyconditionalformatting),itoccursthattheuserafterreleasingthevalueswhentheyneedtobechanged,thefiguresareupdateddynamicallybyExcelitself,butthedashedlinerequiresabuttontobepressedforVBAtoredotheconnections(whichisnatural)thereisavisualdiscrepancybetweenthedataandgraphicalresultspresenteduntiltheroutineistriggered.
Thisunderminestheverydataentrythatdependsonthedesiredresultofwhatisbeinganalyzedgraphically.Thefigurebelowshowsthissituation,thedisconnectionofthedashedlinethatisnotdynamicallychanged.
Thenextfigureshowstheresultaftertheroutineistriggeredbythebutton.
The routine resets the connections immediately without waiting time. What I could not find is a way for the routine to be dynamically triggered as Excel resumes the calculations automatically for any changes that are made to the worksheet.
The Application.Calculate
triggers the calculation in Excel (idem type F9
) from VBA , what I need is the inverse, Excel to trigger the VBA routine.
Is it possible?