ÿÿ  CHHVBScriptEngine       ÿþÿ( A l l g e m e i n )    ÿþÿ( D e k l a r a t i o n e n ) ÿþÿ' ( D e k l a r a t i o n e n )  
 ÿþÿÿc' R e m a r k :   D i g i t a l   D a t a   -   C T K   O b e r f l ä c h e   i n   d e r   W i n L i n e   F A K T ,   z u r   S t e u e r u n g   d e r   B e l e g   E x p o r t e   a u s   d e r   W i n L i n e   ( Z u s a t z f e n s t e r ) .  
 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 '   C o p y r i g h t   ( c )   2 0 2 1   b y   D i g i t a l   D a t a   G m b H  
 '  
 '   D i g i t a l   D a t a   G m b H   "   L u d w i g - R i n n - S t r a s s e   1 6   "   D - 3 5 4 5 2   H e u c h e l h e i m  
 '   T e l . :   0 6 4 1 / 2 0 2 3 6 0   "   E - M a i l :   i n f o - f l o w ( a t ) d i g i t a l d a t a . w o r k s  
 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
 '   C r e a t i o n   D a t e   /   A u t h o r :       1 5 . 0 7 . 2 0 2 1   /   M K  
 '   V e r s i o n   D a t e   /   E d i t o r :         0 6 . 0 7 . 2 0 2 3   /   M K  
 '   V e r s i o n   N u m b e r :                       3 . 2 . 0 . 0  
  
 O n   E r r o r   R e s u m e   N e x t  
  
 ' # # # # # # # # # #   g e t   p a r a m e t e r   # # # # # # # # #  
  
 	 ' N e c e s s a r y   t o   g e t   p a r a m e t e r s   i n   t h e   c o d e .   D o   n o t   c h a n g e !  
 	 p a r a m s   =   M P a r a m e t e r s  
  
 ' # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #  
  
 ' # # # # # # # #   d e c l a r e   v a r i a b l e s   # # # # # # #  
 	  
 	 D i m   G U I D ,   P e r s o n a l A c c o u n t V a r s ,   T i m e V a r s ,   D o c V a r s ,   M a i n W i n d o w _ B u t t o n ,   M a i n W i n d o w _ F i e l d V a l u e ,   G l o b a l P r o p e r t y N u m b e r 1  
 	 D i m   L E V E L 0 _ G R I D _ C O L U M N _ G U I D ,   L E V E L 0 _ G R I D _ C O L U M N _ P L A T Z H A L T E R ,   L E V E L 0 _ G R I D _ C O L U M N _ B E S C H R E I B U N G  
 	 D i m   L E V E L 0 _ G R I D _ C U R R E N T _ G U I D ,   L E V E L 0 _ G R I D _ C U R R E N T _ P L A T Z H A L T E R ,   L E V E L 0 _ G R I D _ C U R R E N T _ B E S C H R E I B U N G  
 	 D i m   C U R R E N T _ R O W ,   C U R R E N T _ C O L U M N ,   D E L I M I T E R 1 ,   D E L I M I T E R 2    
 	  
 	 D i m   L E V E L 1 _ T X T _ E x p o r t P f a d ,   L E V E L 1 _ T X T _ E x p o r t D a t e i n a m e ,   L E V E L 1 _ T X T _ E x p o r t D a t e i n a m e V o r s c h a u  
  
 ' # # # # # # # # # #   s e t   v a r i a b l e s   # # # # # # # # #  
  
 	 ' D e b u g   ( D e b u g   M e l d u n g e n   a n z e i g e n )  
 	 D E B U G _ O N   =   f a l s e   ' t r u e   o r   f a l s e  
 	 D E B U G _ M E S S A G E   =   " "  
 	 D e b u g M o d e       =   " d i s E n a b l e d " 	  
  
 	 T B D D _ E X P O R T _ W I N L I N E D O C _ C O N F I G 	 	 	 =   " [ T 6 5 0 ] "  
  
 	 M A I N _ W I N D O W _ I D 	 	 	   	 	 	 	 =   9 5 0  
 	 P L A C E H O L D E R _ W I N D O W _ I D 	 	 	 	 	 =   9 5 1  
  
 	 ' I m p o r t a n t   f o r   t h e   e x t e r n a l   P l a c h o l d e r   c a l l   ( M A I N _ W I N D O W _ I D   - - >   P L A C E H O L D E R _ W I N D O W _ I D ) ,    
 	 ' T h e   v a r   d e f i n e s   w h i c h   b u t t o n   w a s   p u s h e d  
 	 G l o b a l P r o p e r t y N u m b e r 1 	 	 	 	 	 =   9 5  
  
 	 ' S e p e r a t o r   f o r   P a t h  
 	 D E L I M I T E R 1 	 	 	 	 	 	 	 	 =   " \ "  
  
 	 ' S e p e r a t o r   f o r   F i l e n a m e s  
 	 D E L I M I T E R 2   	 	 	 	 	 	 	 	 =   " - "  
  
 ' # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #  
  
 ' # # # # # # # # # #   s e t   c o n s t a n t s   # # # # # # # # #  
  
 	 ' G e t   c u r r e n t   M a n d a n t o r N r ,   l i k e   " 5 0 0 M " .  
 	 W i n L i n e C u r r e n t M a n d a t o r N r   =   C W L S t a r t . C u r r e n t C o m p a n y . N r  
  
 	 ' G e t   c u r r e n t   m e s o   y e a r ,   l i k e   1 4 4 0   ( ( 2 0 2 0   -   1 9 0 0 )   *   1 2   =   1 4 4 0 ) .  
 	 W i n L i n e C u r r e n t Y e a r   =   C W L S t a r t . C u r r e n t C o m p a n y . C o m p a n y Y e a r  
  
 	 ' G e t   c u r r e n t   u s e r n a m e   l i k e   " m e s o " .  
 	 W i n L i n e C u r r e n t U s e r   =   C W L S t a r t . C u r r e n t U s e r . A c c o u n t  
  
 	 ' G e t   c u r r e n t   W i n L i n e   e x e   p a t h  
 	 W i n L i n e A p p P a t h   =   C W L S t a r t . A p p l i c a t i o n . A p p P a t h  
  
 	 ' G e t   s y s t e m   D a t a b a s e  
 	 W i n L i n e S y s t e m D B   =   C W L S t a r t . C u r r e n t C o m p a n y . G e t S y s t e m C o n n e c t i o n ( 1 6 )  
  
 	 ' G e t   c u r r e n t   " d a t a "   D a t a b a s e  
 	 W i n L i n e D a t a D B   =   C W L S t a r t . C u r r e n t C o m p a n y . C o n n e c t i o n  
  
 	 ' G e t   c u r r e n t   d a t e   a n d   t i m e .  
 	 T i m e s t a m p   =   N o w  
  
 	 ' B a s i c   S Q L   w h e r e   f o r   m a n d a t o r   a n d   c u r r u e n t   m e s o y e a r  
 	 S Q L Q u e r y _ B a s i c W h e r e     =   "   a n d   ( m e s o c o m p   =   ' "   &   W i n L i n e C u r r e n t M a n d a t o r N r   & " ' )   a n d   ( m e s o y e a r   =   "   &   W i n L i n e C u r r e n t Y e a r   &   " )   "  
  
 	 ' M e s s a g e b o x e n  
 	 D E F A U L T _ T I T L E   	 	 	 	 	   	 	 =   " E x p o r t - W i n L i n e D o c _ P l a c e h o l d e r "  
 	 D E B U G _ T I T L E   	 	 	 	 	   	 	 =   " D E B U G   -   "   &   D E F A U L T _ T I T L E  
  
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 	  
  
 	 W i n L i n e V a r s   	 	 =   A r r a y ( " % U s e r N a m e % " , " % K o n t o N r % " , " % K o n t o N a m e % " )  
 	 D o c V a r s     	 	 	 =   A r r a y ( " % L a u f n u m m e r % " , " % P r o j e k t N r % " , " % B e l e g n u m m e r % " , " % B e l e g a r t % " , " % B e l e g K o m m e n t a r % " , _  
 	 	 	 	 	 	 	 	 " % A n g e b o t s N r % " , " % A u f t r a g s N r % " , " % L i e f e r s c h e i n N r % " , " % R e c h n u n g s N r % " , " % A n f r a g e n N r % " , " % B e s t e l l N r % " , _  
 	 	 	 	 	 	   	 	 " % T e x t z e i l e 1 % " , " % T e x t z e i l e 2 % " , " % T e x t z e i l e 3 % " , " % T e x t z e i l e 4 % " , " % T e x t z e i l e 5 % " , _  
 	 	 	 	 	 	 	 	 " % T e x t z e i l e 6 % " , " % T e x t z e i l e 7 % " , " % T e x t z e i l e 8 % " , " % T e x t z e i l e 9 % " , " % T e x t z e i l e 1 0 % " )  
 	 P e r s o n a l A c c o u n t V a r s 	 =   A r r a y ( " % Z u s a t z f e l d 1 % " , " % Z u s a t z f e l d 2 % " , " % Z u s a t z f e l d 3 % " , " % Z u s a t z f e l d 4 % " , " % Z u s a t z f e l d 5 % " , " % Z u s a t z f e l d 6 % " , " % Z u s a t z f e l d 7 % " , " % Z u s a t z f e l d 8 % " , " % Z u s a t z f e l d 9 % " , " % Z u s a t z f e l d 1 0 % " , _  
 	 	 	 	 	 	 	 	 " % Z u s a t z f e l d 1 1 % " , " % Z u s a t z f e l d 1 2 % " , " % Z u s a t z f e l d 1 3 % " , " % Z u s a t z f e l d 1 4 % " , " % Z u s a t z f e l d 1 5 % " , " % Z u s a t z f e l d 1 6 % " , " % Z u s a t z f e l d 1 7 % " , " % Z u s a t z f e l d 1 8 % " , " % Z u s a t z f e l d 1 9 % " , " % Z u s a t z f e l d 2 0 % " , _  
 	 	 	 	 	 	 	 	 " % Z u s a t z f e l d 2 1 % " , " % Z u s a t z f e l d 2 2 % " , " % Z u s a t z f e l d 2 3 % " , " % Z u s a t z f e l d 2 4 % " , " % Z u s a t z f e l d 2 5 % " , " % Z u s a t z f e l d 2 6 % " , " % Z u s a t z f e l d 2 7 % " , " % Z u s a t z f e l d 2 8 % " , " % Z u s a t z f e l d 2 9 % " , " % Z u s a t z f e l d 3 0 % " )  
 	 T i m e V a r s   	 	 	 =   A r r a y ( " % D A Y % " , " % D A Y N A M E % " , " % M O N T H % " , " % M O N T H N A M E % " , " % Y E A R % " )  
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 	  
  
 	 G U I D 	 	 	 	 	 	 	 	 	 =   1  
 	 P R E V E N T _ F O C U S _ C H A N G E   	 	 	 	 	 =   T r u e  
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
  
 	 L E V E L 0 _ G R I D _ I D 	 	 	 	 	 	 	 =   8 0 0  
 	 L E V E L 0 _ G R I D _ C O L U M N _ G U I D 	 	 	 	 	 =   0  
 	 L E V E L 0 _ G R I D _ C O L U M N _ P L A T Z H A L T E R     	 	 =   0  
 	 L E V E L 0 _ G R I D _ C O L U M N _ B E S C H R E I B U N G 	 	 	 =   0  
 	 L E V E L 0 _ T X T _ P L A C E H O L D E R _ I D 	 	 	 	 =   7 9 9  
 	 L E V E L 0 _ B T N _ P L A C E H O L D E R _ I D 	 	 	 	 =   7 9 8  
  
 	 C U R R E N T _ R O W 	 	 	 	 	 	 	 	 =   0  
 	 C U R R E N T _ C O L U M N 	 	 	 	 	 	 	 =   0  
  
 	 L E V E L 0 _ B T N _ O K _ I D 	 	 	 	 	 	 =   9 8  
 	 L E V E L 0 _ B T N _ E X I T _ I D 	 	 	 	 	 	 =   9 9  
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 	  
  
 	 ' C o n t r o l s   f r o m   t h e   m a i n   w i n d o w  
 	 L E V E L 1 _ T X T _ E x p o r t P f a d _ I D 	 	 	 	 =   7 7 1  
 	 L E V E L 1 _ T X T _ E x p o r t D a t e i n a m e _ I D 	 	 	 =   7 7 0  
 	 L E V E L 1 _ T X T _ E x p o r t D a t e i n a m e V o r s c h a u _ I D 	 =   7 6 9  
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
  
 	 S e t   C o n n 	 	 	 	 	 	 	 	 =   C W L S t a r t . C u r r e n t C o m p a n y . C o n n e c t i o n  
 	 S e t   m y W i n 	 	 	 	 	 	 	 	 =   C W L S t a r t . C u r r e n t M o d u l e . W i n d o w s . I t e m ( P L A C E H O L D E R _ W I N D O W _ I D )  
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
  
 	 S e t   L E V E L 0 _ G r i d 	 	 	 	 	 	 	 =   m y W i n . C o n t r o l s . I t e m ( L E V E L 0 _ G R I D _ I D ) . G r i d  
 	 S e t   L E V E L 0 _ B T N _ O K 	 	 	 	 	 	 =   m y W i n . C o n t r o l s . I t e m ( L E V E L 0 _ B T N _ O K _ I D ) 	  
 	 S e t   L E V E L 0 _ T X T _ P l a c e h o l d e r 	 	 	 	 =   m y W i n . C o n t r o l s . I t e m ( L E V E L 0 _ T X T _ P L A C E H O L D E R _ I D )  
 	 S e t   L E V E L 0 _ B T N _ V a r i a b l e E i n f u e g e n 	 	 =   m y W i n . C o n t r o l s . I t e m ( L E V E L 0 _ B T N _ P L A C E H O L D E R _ I D )  
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
  
 	 ' S Q L   Q u e r y   t o   g e t   a l l   c u s t o m   P l a c e h o l d e r s  
 	 S Q L Q u e r y _ E x p o r t W i n L i n e D o c _ C o n f i g s 	 	 =   " S E L E C T   D I S T I N C T   [ u 0 0 4 ] ,   [ u 0 0 5 ]   F R O M   "   &   T B D D _ E X P O R T _ W I N L I N E D O C _ C O N F I G   &   "   ( N O L O C K )   "   & _  
 	 	 	 	 	 	 	 	 	 	 	     " W H E R E   [ u 0 0 1 ]   =   1   A n d   [ u 0 0 4 ]   I n   ( ' C U S T O M _ V A R I A B L E ' )   "   & _  
 	 	 	 	 	 	 	 	 	 	 	     " A n d   [ U 0 0 5 ]   I s   N o t   N u l l   A n d   [ U 0 0 6 ]   I s   N o t   N u l l   A n d   "   & _  
 	 	 	 	 	 	 	 	 	 	 	     " ( [ U 0 0 7 ]   I s   N o t   N u l l   O r   [ U 0 0 8 ]   I s   N o t   N u l l   O r   [ U 0 0 9 ]   I s   N o t   N u l l   O r   [ U 0 1 0 ]   I s   N o t   N u l l )   "  
  
 ÿþÿ' E n d e   v o n   ( D e k l a r a t i o n e n )  
  
 ÿþÿC W L C u r r e n t W i n d o w    ÿþÿO n C h e c k U s e r f i e l d ÿþÿ7S u b   C W L C u r r e n t W i n d o w _ O n C h e c k U s e r f i e l d ( n F g I d ,   b R e s u l t )  
 ÿþÿ¿ 
 	 ' P r e v e n t   " r u m f l a c k e r n " ,   a f t e r   f i r s t   c a l l  
 	 I f   ( P R E V E N T _ F O C U S _ C H A N G E   =   T r u e )   A n d   ( n F g I d   =   L E V E L 0 _ G R I D _ I D )   A n d   ( n F g I d   < >   L E V E L 0 _ B T N _ P L A C E H O L D E R _ I D )   T h e n  
 	 	 b R e s u l t . V a l u e   =   F a l s e  
 	 E n d   I f  
  
 ÿþÿE n d   S u b  
  
 ÿþÿO n G r i d C h a n g e L i n e ÿþÿ.S u b   C W L C u r r e n t W i n d o w _ O n G r i d C h a n g e L i n e ( n F g I d )  
 ÿþÿÿÍ 
 	 I f   ( P R E V E N T _ F O C U S _ C H A N G E   =   F a l s e )   T h e n  
 	 	 P R E V E N T _ F O C U S _ C H A N G E   =   T r u e  
  
 	 E l s e  
 	 	 L E V E L 0 _ G R I D . G e t C u r r e n t C e l l   C U R R E N T _ R O W ,   C U R R E N T _ C O L U M N  
 	 	 G R I D S e l e c t e d L i n e s   =   L E V E L 0 _ G R I D . S e l e c t e d L i n e s  
  
 	 	 I f   i s a r r a y   ( G R I D S e l e c t e d L i n e s )   T h e n  
  
 	 	 	 I f   U b o u n d ( G R I D S e l e c t e d L i n e s )   =   0   T h e n  
  
 	 	 	 	 L E V E L 0 _ G R I D _ C U R R E N T _ R O W 	 	 	 	 	 =   G R I D S e l e c t e d L i n e s ( 0 )  
 	 	 	 	 L E V E L 0 _ G R I D _ C U R R E N T _ G U I D 	 	 	 	 =   L E V E L 0 _ G R I D . G e t C e l l V a l u e ( C U R R E N T _ R O W , L E V E L 0 _ G R I D _ C O L U M N _ G U I D )  
 	 	 	 	 L E V E L 0 _ G R I D _ C U R R E N T _ P L A T Z H A L T E R 	 	 	 =   L E V E L 0 _ G R I D . G e t C e l l V a l u e ( C U R R E N T _ R O W , L E V E L 0 _ G R I D _ C O L U M N _ P L A T Z H A L T E R )  
 	 	 	 	 L E V E L 0 _ G R I D _ C U R R E N T _ B E S C H R E I B U N G 	 	 =   L E V E L 0 _ G R I D . G e t C e l l V a l u e ( C U R R E N T _ R O W , L E V E L 0 _ G R I D _ C O L U M N _ B E S C H R E I B U N G )  
  
 	 	 	 	 I f   ( D E B U G _ O N   =   T r u e )   O r   ( D e b u g M o d e   =   " E n a b l e d " )   T h e n  
 	 	 	 	 	 m s g b o x 	 " C U R R E N T _ R O W : 	 	 	 "   &   L E V E L 0 _ G R I D _ C U R R E N T _ R O W 	 	 	 	 &   v b C r l f   &   _  
 	 	 	 	 	 	 	 " C U R R E N T _ G U I D : 	 	 	 "   &   L E V E L 0 _ G R I D _ C U R R E N T _ G U I D 	 	 	 &   v b C r l f   &   _  
 	 	 	 	 	 	 	 " C U R R E N T _ P l a t z h a l t e r : 	 "   &   L E V E L 0 _ G R I D _ C U R R E N T _ P L A T Z H A L T E R 	 	 &   v b C r l f   &   _  
 	 	 	 	 	 	 	 " C U R R E N T _ B e s c h r e i b u n g : 	 "   &   L E V E L 0 _ G R I D _ C U R R E N T _ B E S C H R E I B U N G 	 &   v b C r l f   &   _  
 	 	 	 	 	 	 	 " " , v b O k a y o n l y + v b I n f o r m a t i o n ,   D E B U G _ T I T L E   &   " S w i t c h W i n L i n e E x p o r t W i n L i n e D o c _ P l a c e h o l d e r _ _ T a b l e C o n t e n t "  
 	 	 	 	 E n d   I f  
  
 	 	 	 	 I f   ( L E V E L 0 _ G R I D _ C U R R E N T _ G U I D   >   0 )   T h e n  
  
 	 	 	 	 	 ' D e t e r m   w h i c h   s o u r c e   B u t t o n   i n   m a i n   w i n d o w   w a s   p u s h e d  
 	 	 	 	 	 ' W h e n   B u t t o n   w a s   p u s h e d   m u l t i p l e   t i m e s  
 	 	 	 	 	 I f   	 	 ( M a i n W i n d o w _ B u t t o n   =   " E x p o r t P f a d " )   T h e n  
 	 	 	 	 	 	 	 M a i n W i n d o w _ F i e l d V a l u e   =   M a c r o C o m m a n d s . M G e t F i e l d V a l u e ( M A I N _ W I N D O W _ I D ,   L E V E L 1 _ T X T _ E x p o r t P f a d _ I D )  
  
 	 	 	 	 	 E l s e i f 	 ( M a i n W i n d o w _ B u t t o n   =   " E x p o r t D a t e i n a m e " )   T h e n  
 	 	 	 	 	 	 	 M a i n W i n d o w _ F i e l d V a l u e   =   M a c r o C o m m a n d s . M G e t F i e l d V a l u e ( M A I N _ W I N D O W _ I D ,   L E V E L 1 _ T X T _ E x p o r t D a t e i n a m e _ I D )  
  
 	 	 	 	 	 E l s e i f 	 ( M a i n W i n d o w _ B u t t o n   =   " E x p o r t D a t e i n a m e V o r s c h a u " )   T h e n  
 	 	 	 	 	 	 	 M a i n W i n d o w _ F i e l d V a l u e   =   M a c r o C o m m a n d s . M G e t F i e l d V a l u e ( M A I N _ W I N D O W _ I D ,   L E V E L 1 _ T X T _ E x p o r t D a t e i n a m e V o r s c h a u _ I D )  
  
 	 	 	 	 	 E n d   I f  
  
 	 	 	 	 	 ' H a n d l e   i f   F i e l d   i s   e m p t y  
 	 	 	 	 	 I f   ( M a i n W i n d o w _ F i e l d V a l u e   < >   " " )   T h e n  
 	 	 	 	 	 	 I f   	 	 ( M a i n W i n d o w _ B u t t o n   =   " E x p o r t P f a d " )   T h e n  
 	 	 	 	 	 	 	 M a i n W i n d o w _ F i e l d V a l u e   =   M a i n W i n d o w _ F i e l d V a l u e   &   D E L I M I T E R 1   &   L E V E L 0 _ G R I D _ C U R R E N T _ P L A T Z H A L T E R  
  
 	 	 	 	 	 	 E l s e i f 	 ( M a i n W i n d o w _ B u t t o n   =   " E x p o r t D a t e i n a m e " )   T h e n  
 	 	 	 	 	 	 	 M a i n W i n d o w _ F i e l d V a l u e   =   M a i n W i n d o w _ F i e l d V a l u e   &   D E L I M I T E R 2   &   L E V E L 0 _ G R I D _ C U R R E N T _ P L A T Z H A L T E R 	 	 	 	 	  
  
 	 	 	 	 	 	 E l s e i f 	 ( M a i n W i n d o w _ B u t t o n   =   " E x p o r t D a t e i n a m e V o r s c h a u " )   T h e n  
 	 	 	 	 	 	 	 M a i n W i n d o w _ F i e l d V a l u e   =   M a i n W i n d o w _ F i e l d V a l u e   &   D E L I M I T E R 2   &   L E V E L 0 _ G R I D _ C U R R E N T _ P L A T Z H A L T E R  
  
 	 	 	 	 	 	 E n d   I f  
  
 	 	 	 	 	 E l s e  
 	 	 	 	 	 	 M a i n W i n d o w _ F i e l d V a l u e   =   L E V E L 0 _ G R I D _ C U R R E N T _ P L A T Z H A L T E R 	  
 	 	 	 	 	 E n d   I f  
  
 	 	 	 	 	 ' R e p l a c e   l i n e   b r e a k s  
 	 	 	 	 	 M a i n W i n d o w _ F i e l d V a l u e   =   R e p l a c e ( M a i n W i n d o w _ F i e l d V a l u e ,   v b C r ,   " " )  
 	 	 	 	 	 M a i n W i n d o w _ F i e l d V a l u e   =   R e p l a c e ( M a i n W i n d o w _ F i e l d V a l u e ,   v b L f ,   " " )  
  
 	 	 	 	 	 ' A c t i v a t e   F i e l d   f o r   a   s h o r t   t i m e  
 	 	 	 	 	 L E V E L 0 _ T X T _ P l a c e h o l d e r . A c t i v e       	 	 =   T r u e  
 	 	 	 	 	 L E V E L 0 _ T X T _ P l a c e h o l d e r . c o n t e n t s   	 	 =   " F e l d :   "   &   M a i n W i n d o w _ B u t t o n   &   v b C r   &   v b L f   &   _  
 	 	 	 	 	 	 	 	 	 	 	 	     	 	     	     " V o r s c h a u :   "   &   M a i n W i n d o w _ F i e l d V a l u e  
  
 	 	 	 	 	 ' I n a c t i v e   F i e l d   a n d   a c t i v e   B u t t o n  
 	 	 	 	 	 L E V E L 0 _ B T N _ O K . A c t i v e   	 	 	 	 	 =   T r u e  
 	 	 	 	 	 L E V E L 0 _ T X T _ P l a c e h o l d e r . A c t i v e 	 	 	 =   F a l s e  
 	 	 	 	 	 L E V E L 0 _ B T N _ V a r i a b l e E i n f u e g e n . A c t i v e   	 =   T r u e  
  
 	 	 	 	 	 ' R e s t o r e   f o c u s ,   t o   m a k e   g r i d   s c r o l l a b l e  
 	 	 	 	 	 P R E V E N T _ F O C U S _ C H A N G E   =   F a l s e  
 	 	 	 	 	 M a c r o C o m m a n d s . M S e t F i e l d F o c u s   P L A C E H O L D E R _ W I N D O W _ I D , L E V E L 0 _ G R I D _ I D  
  
 	 	 	 	 E n d   I f  
  
 	 	 	 E l s e  
  
 	 	 	 	 ' I m p o r t a n t   i n   t h i s   c a s e ,   t o   s e t   t h e s e   v a r s   t o   0   a t   f i r s t  
 	 	 	 	 L E V E L 0 _ G R I D _ C U R R E N T _ G U I D 	 	 	 	 	 =   0  
 	 	 	 	 L E V E L 0 _ G R I D _ C U R R E N T _ P L A T Z H A L T E R 	 	 	 	 =   0  
 	 	 	 	 L E V E L 0 _ G R I D _ C U R R E N T _ B E S C H R E I B U N G 	 	 	 =   0  
  
 	 	 	 	 ' I f   n o   v a l i d   l i n e   w a s   s e l e c t e d ,   c l e a r   a n d . . .  
 	 	 	 	 L E V E L 0 _ T X T _ P l a c e h o l d e r . A c t i v e       	 	 	 =   T r u e  
 	 	 	 	 L E V E L 0 _ T X T _ P l a c e h o l d e r . c o n t e n t s   	 	 	 =   " "  
  
 	 	 	 	 ' . . . i n a c t i v e   F i e l d   a n d   B u t t o n  
 	 	 	 	 L E V E L 0 _ B T N _ O K . A c t i v e   	 	 	 	 	 	 =   F a l s e  
 	 	 	 	 L E V E L 0 _ T X T _ P l a c e h o l d e r . A c t i v e 	 	 	 	 =   F a l s e  
 	 	 	 	 L E V E L 0 _ B T N _ V a r i a b l e E i n f u e g e n . A c t i v e   	 	 =   F a l s e  
  
 	 	 	 E n d   I f  
 	 	 E n d   I f  
 	 E n d   I f  
  
 ÿþÿE n d   S u b  
  
 ÿþÿO n P u s h B u t t o n ÿþÿ3S u b   C W L C u r r e n t W i n d o w _ O n P u s h B u t t o n ( n F g I d ,   b R e s u l t )  
 ÿþÿÿv	  
 	 I f   ( ( n F g I d   =   L E V E L 0 _ B T N _ O K _ I D )   O r   ( n F g I d   =   L E V E L 0 _ B T N _ P L A C E H O L D E R _ I D ) )   T h e n  
  
 	 	 ' D e t e r m   w h i c h   B u t t o n   i n   m a i n   w i n d o w   w a s   p u s h e d   a n d   T r a n s f e r   n e w   v a l u e   t o   t h e   m a i n   w i n d o w  
 	 	 I f 	 	 ( M a i n W i n d o w _ B u t t o n   =   " E x p o r t P f a d " )   A n d   ( M a i n W i n d o w _ F i e l d V a l u e   < >   " " )   T h e n  
 	 	 	 M a c r o C o m m a n d s . M S e t F i e l d V a l u e   M A I N _ W I N D O W _ I D ,   L E V E L 1 _ T X T _ E x p o r t P f a d _ I D ,   M a i n W i n d o w _ F i e l d V a l u e  
 	 	 	 M a c r o C o m m a n d s . M S e t F i e l d F o c u s   M A I N _ W I N D O W _ I D ,   L E V E L 1 _ T X T _ E x p o r t P f a d _ I D  
  
 	 	 E l s e i f   	 ( M a i n W i n d o w _ B u t t o n   =   " E x p o r t D a t e i n a m e " )   A n d   ( M a i n W i n d o w _ F i e l d V a l u e   < >   " " )   T h e n  
 	 	 	 M a c r o C o m m a n d s . M S e t F i e l d V a l u e   M A I N _ W I N D O W _ I D ,   L E V E L 1 _ T X T _ E x p o r t D a t e i n a m e _ I D ,   M a i n W i n d o w _ F i e l d V a l u e  
 	 	 	 M a c r o C o m m a n d s . M S e t F i e l d F o c u s   M A I N _ W I N D O W _ I D ,   L E V E L 1 _ T X T _ E x p o r t D a t e i n a m e _ I D  
  
 	 	 E l s e i f 	 ( M a i n W i n d o w _ B u t t o n   =   " E x p o r t D a t e i n a m e V o r s c h a u " )   A n d   ( M a i n W i n d o w _ F i e l d V a l u e   < >   " " )   T h e n  
 	 	 	 M a c r o C o m m a n d s . M S e t F i e l d V a l u e   M A I N _ W I N D O W _ I D ,   L E V E L 1 _ T X T _ E x p o r t D a t e i n a m e V o r s c h a u _ I D ,   M a i n W i n d o w _ F i e l d V a l u e  
 	 	 	 M a c r o C o m m a n d s . M S e t F i e l d F o c u s   M A I N _ W I N D O W _ I D ,   L E V E L 1 _ T X T _ E x p o r t D a t e i n a m e V o r s c h a u _ I D  
  
 	 	 E l s e  
 	 	 	 m s g b o x 	 " F e h l e r   b e i m   A u f r u f ! "   	 	 	 	 	 	 	 	 	 	 	 	 &   v b L f   &   _  
 	 	 	 	 	 " D i e s e s   F e n s t e r   d a r f   n u r   ü b e r   d a s   H a u p t f e n s t e r   a u f g e r u f e n   w e r d e n ! " 	 &   v b L f   &   _  
 	 	 	 	 	 " " , v b C r i t i c a l + v b O k a y o n l y , D E F A U L T _ T I T L E  
  
 	 	 	 ' I f   c a l l   w a s   u n k n o w n ,   c l o s e   a d d i t i o n a l   w i n d o w  
 	 	 	 M a c r o C o m m a n d s . M A c t i v a t e W i n d o w   P L A C E H O L D E R _ W I N D O W _ I D  
 	 	 	 M a c r o C o m m a n d s . M P u s h B u t t o n   P L A C E H O L D E R _ W I N D O W _ I D ,   L E V E L 0 _ B T N _ E X I T _ I D ,   0 	 	 	 	 	  
  
 	 	 E n d   I f  
  
 	 	 ' f i n a l l y   r e f r e s h   g r i d   l i n e  
 	 	 C W L C u r r e n t W i n d o w _ O n G r i d C h a n g e L i n e ( L E V E L 0 _ G R I D _ I D )  
  
 	 E n d   I f  
  
 	 ' W h i l e   c l o s i n g ,   s e t   m a i n   w i n d o w   t o   a c t i v e   a g a i n  
 	 I f   ( n F g I d   =   L E V E L 0 _ B T N _ E X I T _ I D )   T h e n  
 	 	 M a c r o C o m m a n d s . M S e t F i e l d F o c u s   M A I N _ W I N D O W _ I D ,   L E V E L 1 _ G R I D _ I D  
  
 	 E n d   I f  
  
 ÿþÿE n d   S u b  
  
 ÿþÿ	C W L S c r i p t    ÿþÿO n S c r i p t S t a r t ÿþÿS u b   C W L S c r i p t _ O n S c r i p t S t a r t ( )  
 ÿþÿÿ 
 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . C r e a t e V a r   4 9 5 ,   0 ,   " 2 " ,     2 5 	 ' G U I D   /   I n t e g e r 	  
 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . C r e a t e V a r   4 9 5 ,   1 ,   " 1 " ,   5 1 2 	 ' P l a t z h a l t e r     /   S t r i n g  
 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . C r e a t e V a r   4 9 5 ,   2 ,   " 1 " ,   5 1 2 	 ' B e s c h r e i b u n g   /   S t r i n g  
  
 	 ' P r e p a r e   T a b l e  
 	 L E V E L 0 _ G R I D _ C O L U M N _ G U I D 	 	 	 	 	 =   L E V E L 0 _ G r i d . A d d C o l u m n ( " G U I D " , 	 	 	 " T 2 1 , G U I D " , 	 	 	 	 " 1 " , " V " , 0 , 4 9 5 , 0 ,   0 , s c r t f l a g + s i z e f l a g + h i d e f l a g )  
 	 L E V E L 0 _ G R I D _ C O L U M N _ P L A T Z H A L T E R     	 	 =   L E V E L 0 _ G r i d . A d d C o l u m n ( " P l a t z h a l t e r " , 	 " T 2 1 , P l a t z h a l t e r " , 	 	 " 1 " , " V " , 0 , 4 9 5 , 1 , 2 9 , s c r t f l a g + s i z e f l a g + h i d e f l a g )  
 	 L E V E L 0 _ G R I D _ C O L U M N _ B E S C H R E I B U N G     	 	 =   L E V E L 0 _ G r i d . A d d C o l u m n ( " T y p " , 	 	 	 " T 2 1 , T y p " , 	 	 	 	 " r " , " V " , 0 , 4 9 5 , 2 , 1 9 , s c r t f l a g + s i z e f l a g + h i d e f l a g )  
  
 	 L E V E L 0 _ G r i d . I n i t U s e r G r i d  
 	 L E V E L 0 _ G r i d . I s R e d r a w   =   F a l s e  
 	 L E V E L 0 _ G r i d . H e a d e r 	  
 	  
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
  
 	 ' L o o p   t o   s e t   c u s t o m   v a r s   i n t o   t h e   l i s t  
 	 S e t   S Q L R e s u l t _ E x p o r t W i n L i n e D o c _ C o n f i g s   =   C o n n . S e l e c t ( S Q L Q u e r y _ E x p o r t W i n L i n e D o c _ C o n f i g s )  
 	 I f   ( S Q L R e s u l t _ E x p o r t W i n L i n e D o c _ C o n f i g s . R o w C o u n t )   >   0   T h e n  
 	 	 D o    
 	 	 	 ' I n c r e a s e   G U I D  
 	 	 	 G U I D   =   G U I D + 1  
  
 	 	 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . V a l u e ( 4 9 5 , 0 )   =     C i n t ( G U I D )  
 	 	 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . V a l u e ( 4 9 5 , 1 )   =     C s t r ( S Q L R e s u l t _ E x p o r t W i n L i n e D o c _ C o n f i g s . v a l u e ( " u 0 0 5 " ) )  
 	 	 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . V a l u e ( 4 9 5 , 2 )   =     C s t r ( S Q L R e s u l t _ E x p o r t W i n L i n e D o c _ C o n f i g s . v a l u e ( " u 0 0 4 " ) )  
 	 	 	 L E V E L 0 _ G r i d . A d d L i n e ( )  
  
 	 	 	 ' T r i c k   i t ,   b e c a u s e   r o w c o u n t   w o n t   w o r k  
 	 	 	 I f   ( S Q L R e s u l t _ E x p o r t W i n L i n e D o c _ C o n f i g s . N e x t R e c o r d   =   F a l s e )   T h e n  
 	 	 	 	 E x i t   D o    
 	 	 	 E n d   I f    
 	 	 L o o p    
 	 E n d   I f  
  
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
  
 	 ' L o o p   t o   s e t   t i m e   v a r s   i n t o   t h e   l i s t  
 	 F o r   i   =   0   T o   U b o u n d ( T i m e V a r s )  
  
 	 	 ' I n c r e a s e   G U I D  
 	 	 G U I D   =   G U I D + 1  
  
 	 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . V a l u e ( 4 9 5 , 0 )   =   C i n t ( G U I D ) 	 	  
 	 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . V a l u e ( 4 9 5 , 1 )   =   T i m e V a r s ( i )  
 	 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . V a l u e ( 4 9 5 , 2 )   =   " A l l g e m e i n e   V a r i a b l e "  
 	 	 L E V E L 0 _ G r i d . A d d L i n e ( )  
  
 	 N e x t  
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 	  
  
 	 ' L o o p   t o   s e t   W i n L i n e   v a r s   i n t o   t h e   l i s t  
 	 F o r   i   =   0   T o   U b o u n d ( W i n L i n e V a r s )  
  
 	 	 ' I n c r e a s e   G U I D  
 	 	 G U I D   =   G U I D + 1  
  
 	 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . V a l u e ( 4 9 5 , 0 )   =   C i n t ( G U I D ) 	 	  
 	 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . V a l u e ( 4 9 5 , 1 )   =   W i n L i n e V a r s ( i )  
 	 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . V a l u e ( 4 9 5 , 2 )   =   " W i n L i n e   V a r i a b l e "  
 	 	 L E V E L 0 _ G r i d . A d d L i n e ( )  
  
 	 N e x t  
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 	  
 	  
 	 ' L o o p   t o   s e t   t i m e   v a r s   i n t o   t h e   l i s t  
 	 F o r   i   =   0   T o   U b o u n d ( D o c V a r s )  
  
 	 	 ' I n c r e a s e   G U I D  
 	 	 G U I D   =   G U I D + 1  
  
 	 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . V a l u e ( 4 9 5 , 0 )   =   C i n t ( G U I D ) 	 	  
 	 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . V a l u e ( 4 9 5 , 1 )   =   D o c V a r s ( i )  
 	 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . V a l u e ( 4 9 5 , 2 )   =   " F A K T   V a r i a b l e "  
 	 	 L E V E L 0 _ G r i d . A d d L i n e ( )  
  
 	 N e x t  
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
  
 	 ' L o o p   t o   s e t   P e r s o n a l A c c o u n t   v a r s   i n t o   t h e   l i s t  
 	 F o r   i   =   0   T o   U b o u n d ( P e r s o n a l A c c o u n t V a r s )  
  
 	 	 ' I n c r e a s e   G U I D  
 	 	 G U I D   =   G U I D + 1  
  
 	 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . V a l u e ( 4 9 5 , 0 )   =   C i n t ( G U I D ) 	 	  
 	 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . V a l u e ( 4 9 5 , 1 )   =   P e r s o n a l A c c o u n t V a r s ( i )  
 	 	 C W L C u r r e n t W i n d o w . A c t i v e W i n d o w . V a r s . V a l u e ( 4 9 5 , 2 )   =   " P e r s o n e n k o n t o "  
 	 	 L E V E L 0 _ G r i d . A d d L i n e ( )  
  
 	 N e x t 	  
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
  
 	 L E V E L 0 _ G r i d . I s R e d r a w   =   T r u e  
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 	  
  
 	 L E V E L 0 _ B T N _ O K . A c t i v e   =   F a l s e  
 	 L E V E L 0 _ T X T _ P l a c e h o l d e r . A c t i v e   =   F a l s e  
 	 L E V E L 0 _ B T N _ V a r i a b l e E i n f u e g e n . A c t i v e   =   F a l s e  
 	 ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
  
 	 ' c o p y   G l o b a l P r o p e r t y   v a r   t o   l o c a l   v a r  
 	 M a i n W i n d o w _ B u t t o n   = 	 G l o b a l P r o p e r t y ( G l o b a l P r o p e r t y N u m b e r 1 )  
  
 	 ' A f t e r   i t   c l e a r   v a r  
 	 G l o b a l P r o p e r t y ( G l o b a l P r o p e r t y N u m b e r 1 )   =   N o t h i n g  
  
 ÿþÿE n d   S u b  
  
 