From d2a9549e7786c64e131bab2ab476f3cf01f61bf4 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 15 Mar 2019 16:42:58 -0400 Subject: [PATCH] clean up --- fpvt.frx | Bin 19992 -> 19992 bytes handler.bas | 8 ++-- pivot.cls | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 112 insertions(+), 3 deletions(-) create mode 100644 pivot.cls diff --git a/fpvt.frx b/fpvt.frx index 0d88ecb4062aa1ca55e02e0fa6712884837d1631..089b632fe0ee5055c966506daf66438e282c834e 100644 GIT binary patch delta 856 zcmZ8fT}YEr82--rW;B}1B+<578=F6KxWC-y=G;##ZJSH*4-}-P4VHeg)m#)&77;NB zDxN?KE9y#!LijF1Nf084E_RV!wCqPO6CojpAfnDUi)a_;JMZ_L^SDkpqb?5DbVH;W>$)Wj8x1&ORKj4iLZQD$I6TtV6HZ*# zPs-?69=#3qyufkryY^tJ;R`#zYHY<5Pc;fgJIRZRMvaVtCNoPyPw{)s+{lk4@|ZPu z%Q!A=FXmQT9`eUWv$#k#cxUM;#&e;Qgy5C$C8it+^y&NE@sSp>oO`_Re0d_Q9CEDd4p2>21I;M`S@@PHY~Lmidr$?zru5j z^_str7tV5U2TUX=CIS`YPggb55nxL%)*S4kEC@<8tk$-oz6IY-GRZu0q2TV5C|f;4 zOsKLw$NawG*I~YW2ealy`+d@aM2C^*vK(%*oxNr(c087Pi{pnK#aFOlsbl;ENngdG zFg@VJinWI(Q+OMxBM$tEcv-2{h=$GAgn(=}Zbuhbo8HcD%B3*dX<|Q;=FgqdI0j-f Le7HY??=kIf@6|as delta 963 zcmZuvZAepL6u$4hGaUIj{8-c0=1Ql+cDHo9bMx*_+N`M!AA}Sbx{m6pEpIMO*L=a(T?`*>8$9>Lwp7%Wu=RD`m%#xW| zvY=xL0~PFZ#5GpOG7S7?&vO`+NiIj76MGq03oD7dILUu2`Paf9-;p$>E{Jm(ie5pY zIG$mS-@`gkYvTFzgk>};3C)Iz_+YGjn#f9?HpXTuwl#D+8fivdk;N#9iXS`OY?tlL zdIV~H7NaEe>x2!<5HTF!7@YH_;b$tnY8)gE*f1`ql1EilWf6v9wTu~`>|&TH--%P> z@iBU3hCI_95`l-N8WK@fOp_`$%0Q2~hRS)Jdtlo9o$zq6){TlbRT-?-+Tn^RU(wcS zR7llZY7o0APFU(VCd|ORrAx&#F*~H{%dPjhk+vvIv3mGm?S|1qKCrm2N}DD(GTs-8jLRYT6f{7e%}QIiWLqXk>s0)kk6*RWkSpst& zk&Q-_b&rp*!vcJ@RzpyH3ah*s2HSY(_g>&SN0PAa?WNHr)sv(mOGRYcEC~&(QnW3- zEPN9r`i=4p@Je){ciq(81%Iy^x0{|C3IYin^19aui-FzP?2Eu%M7gz=>fgYa`dOZ} zKIU2{x|GqwjRbd?^2h;`q8poQD0TeDP5LJ5CcUzM)myxUO1}?Qqt;f?17Hh)q|(Bz kwk33 1 Then handler.sql = handler.sql & vbCrLf & "AND " + If i <> 1 Then handler.jsql = handler.jsql & vbCrLf & "," + handler.sql = handler.sql & rd(piv_pos(rd, i)).Name & " = '" & ri(i).Name & "'" + jsql = jsql & """" & rd(piv_pos(rd, i)).Name & """:""" & ri(i).Name & """" + handler.sc(i - 1, 0) = rd(piv_pos(rd, i)).Name + handler.sc(i - 1, 1) = ri(i).Name + Next i + + + scenario = "{" & handler.jsql & "}" + + Call handler.load_config + Call handler.load_fpvt + + +nopiv: + +End Sub + +Function piv_pos(list As Object, target_pos As Long) As Long + + Dim i As Long + + For i = 1 To list.Count + If list(i).Position = target_pos Then + piv_pos = i + Exit Function + End If + Next i + 'should not get to this point + +End Function + +Function piv_fld_index(field_name As String, ByRef pt As PivotTable) As Integer + + Dim i As Integer + + For i = 1 To pt.PivotFields.Count + If pt.PivotFields(i).Name = field_name Then + piv_fld_index = i + Exit Function + End If + Next i + +End Function + + + + + +