VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.2#0"; "MSCOMCTL.OCX"
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
Begin VB.Form Form_mant_ntcr 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Mantencion Notas de Creditos Emitidas"
   ClientHeight    =   7605
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   8595
   Icon            =   "Form_mant_ntcr.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   7605
   ScaleWidth      =   8595
   Begin VB.Frame Frame11 
      Caption         =   "Ingresar N. de C. Nula"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   2535
      Left            =   2400
      TabIndex        =   44
      Top             =   4200
      Visible         =   0   'False
      Width           =   3855
      Begin MSComctlLib.ImageCombo ImageCombo1 
         Height          =   345
         Left            =   1080
         TabIndex        =   52
         Top             =   360
         Width           =   2415
         _ExtentX        =   4260
         _ExtentY        =   609
         _Version        =   393216
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Text            =   "ImageCombo1"
      End
      Begin VB.CommandButton Command13 
         Caption         =   "Cancelar"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   1920
         TabIndex        =   50
         Top             =   1800
         Width           =   1335
      End
      Begin VB.CommandButton Command12 
         Caption         =   "Anular Folio"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   480
         TabIndex        =   49
         Top             =   1800
         Width           =   1335
      End
      Begin MSComCtl2.DTPicker DTPicker3 
         Height          =   285
         Left            =   1080
         TabIndex        =   47
         Top             =   1320
         Width           =   2415
         _ExtentX        =   4260
         _ExtentY        =   503
         _Version        =   393216
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Format          =   51642369
         CurrentDate     =   40716
      End
      Begin VB.TextBox Text3 
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   1080
         TabIndex        =   45
         Top             =   840
         Width           =   2415
      End
      Begin VB.Label Label12 
         Caption         =   "Colegio:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   360
         TabIndex        =   51
         Top             =   360
         Width           =   615
      End
      Begin VB.Label Label11 
         Caption         =   "Fecha:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   360
         TabIndex        =   48
         Top             =   1320
         Width           =   615
      End
      Begin VB.Label Label10 
         Caption         =   "Folio:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   360
         TabIndex        =   46
         Top             =   840
         Width           =   615
      End
   End
   Begin VB.Frame Frame5 
      Height          =   855
      Left            =   120
      TabIndex        =   14
      Top             =   6600
      Width           =   8295
      Begin VB.CommandButton Command11 
         Caption         =   "Ingresar N. de C. Nula"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   3600
         TabIndex        =   43
         Top             =   240
         Width           =   1335
      End
      Begin VB.CommandButton Command10 
         Caption         =   "Anular N. de C"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   5280
         TabIndex        =   42
         Top             =   240
         Width           =   1335
      End
      Begin VB.CommandButton Command2 
         Caption         =   "Salir"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   6960
         TabIndex        =   15
         Top             =   240
         Width           =   1215
      End
      Begin VB.Label Label9 
         Caption         =   "Label9"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   1200
         TabIndex        =   41
         Top             =   360
         Visible         =   0   'False
         Width           =   975
      End
      Begin VB.Label Label8 
         Caption         =   "Label8"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   40
         Top             =   360
         Visible         =   0   'False
         Width           =   735
      End
   End
   Begin VB.Frame Frame4 
      Caption         =   "Notas de Credito Emitidas"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   2295
      Left            =   120
      TabIndex        =   12
      Top             =   1800
      Width           =   8295
      Begin VB.Frame Frame10 
         Caption         =   "Anular Nota de Credito"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C00000&
         Height          =   2055
         Left            =   2040
         TabIndex        =   36
         Top             =   120
         Visible         =   0   'False
         Width           =   4215
         Begin VB.CommandButton Command9 
            Caption         =   "Cancelar"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   495
            Left            =   2160
            MaskColor       =   &H00FFFFFF&
            TabIndex        =   38
            Top             =   1320
            Width           =   1335
         End
         Begin VB.CommandButton Command8 
            Caption         =   "Aceptar"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   495
            Left            =   600
            TabIndex        =   37
            Top             =   1320
            Width           =   1335
         End
         Begin VB.Label Label6 
            Alignment       =   2  'Center
            Caption         =   "Se encuentra a punto de anular la nota de credito seleccionada. ¿Está seguro de continuar?"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   615
            Left            =   720
            TabIndex        =   39
            Top             =   360
            Width           =   2775
         End
      End
      Begin MSHierarchicalFlexGridLib.MSHFlexGrid grillantcr 
         Height          =   1935
         Left            =   120
         TabIndex        =   13
         Top             =   240
         Width           =   8055
         _ExtentX        =   14208
         _ExtentY        =   3413
         _Version        =   393216
         BackColor       =   16777215
         Cols            =   4
         FixedCols       =   0
         BackColorSel    =   14737632
         ForeColorSel    =   16711680
         BackColorBkg    =   16777215
         AllowBigSelection=   0   'False
         FillStyle       =   1
         GridLinesUnpopulated=   2
         SelectionMode   =   1
         FormatString    =   "<Folio |<Monto Credito|<Apoderado|<Fecha"
         RowSizingMode   =   1
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _NumberOfBands  =   1
         _Band(0).Cols   =   4
         _Band(0).TextStyleBand=   0
      End
   End
   Begin VB.Frame Frame3 
      Caption         =   "Detalle Nota de Credito"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   2295
      Left            =   120
      TabIndex        =   10
      Top             =   4200
      Width           =   8295
      Begin VB.Frame Frame8 
         Caption         =   "Anular Detalle Nota de Credito"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C00000&
         Height          =   1935
         Left            =   2040
         TabIndex        =   19
         Top             =   360
         Visible         =   0   'False
         Width           =   4215
         Begin VB.CommandButton Command4 
            Caption         =   "Aceptar"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   495
            Left            =   600
            TabIndex        =   21
            Top             =   1200
            Width           =   1335
         End
         Begin VB.CommandButton Command5 
            Caption         =   "Cancelar"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   495
            Left            =   2160
            MaskColor       =   &H00FFFFFF&
            TabIndex        =   20
            Top             =   1200
            Width           =   1335
         End
         Begin VB.Label Label5 
            Alignment       =   2  'Center
            Caption         =   "Se encuentra a punto de anular la linea de detalle seleccionada. ¿Está seguro de continuar?"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   615
            Left            =   720
            TabIndex        =   22
            Top             =   360
            Width           =   2775
         End
      End
      Begin MSHierarchicalFlexGridLib.MSHFlexGrid GrillaDetaNtcr 
         Height          =   1935
         Left            =   120
         TabIndex        =   11
         Top             =   240
         Width           =   8055
         _ExtentX        =   14208
         _ExtentY        =   3413
         _Version        =   393216
         BackColor       =   16777215
         Cols            =   3
         FixedCols       =   0
         BackColorSel    =   14737632
         ForeColorSel    =   16711680
         BackColorBkg    =   16777215
         AllowBigSelection=   0   'False
         FillStyle       =   1
         GridLinesUnpopulated=   2
         SelectionMode   =   1
         FormatString    =   "<Folio Boleta|<Monto Credito|<Glosa"
         RowSizingMode   =   1
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _NumberOfBands  =   1
         _Band(0).Cols   =   3
         _Band(0).TextStyleBand=   0
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "Buscar Por"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1575
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   1575
      Begin VB.OptionButton Option1 
         Caption         =   "No Emitidas"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   3
         Left            =   120
         TabIndex        =   33
         Top             =   1080
         Value           =   -1  'True
         Width           =   1215
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Folio"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   2
         Left            =   120
         TabIndex        =   3
         Top             =   840
         Width           =   1215
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Apoderado"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   1
         Left            =   120
         TabIndex        =   2
         Top             =   600
         Width           =   1215
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Fecha"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   0
         Left            =   120
         TabIndex        =   1
         Top             =   360
         Width           =   1215
      End
   End
   Begin VB.ListBox List2 
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1320
      Left            =   6960
      TabIndex        =   28
      TabStop         =   0   'False
      Top             =   720
      Visible         =   0   'False
      Width           =   1335
   End
   Begin VB.ListBox List1 
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1320
      Left            =   2520
      TabIndex        =   27
      TabStop         =   0   'False
      Top             =   720
      Visible         =   0   'False
      Width           =   3975
   End
   Begin VB.CheckBox Check1 
      Caption         =   "Ver solo Emitidas"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1920
      TabIndex        =   18
      Top             =   1080
      Width           =   1575
   End
   Begin VB.Frame Frame9 
      Caption         =   "No Emitidas"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1335
      Left            =   1800
      TabIndex        =   34
      Top             =   120
      Width           =   6615
      Begin VB.CommandButton Command7 
         Caption         =   "Mostrar"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   5280
         TabIndex        =   35
         Top             =   840
         Width           =   1215
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "Fecha"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1335
      Left            =   1800
      TabIndex        =   4
      Top             =   120
      Width           =   6615
      Begin VB.CommandButton Command1 
         Caption         =   "Buscar"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   5280
         TabIndex        =   9
         Top             =   720
         Width           =   1215
      End
      Begin MSComCtl2.DTPicker DTPicker2 
         Height          =   375
         Left            =   2880
         TabIndex        =   8
         Top             =   360
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   661
         _Version        =   393216
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Format          =   51642369
         CurrentDate     =   38859
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   375
         Left            =   720
         TabIndex        =   6
         Top             =   360
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   661
         _Version        =   393216
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Format          =   51642369
         CurrentDate     =   38859
      End
      Begin VB.Label Label2 
         Caption         =   "Hasta :"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   2280
         TabIndex        =   7
         Top             =   480
         Width           =   735
      End
      Begin VB.Label Label1 
         Caption         =   "Desde :"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   5
         Top             =   480
         Width           =   735
      End
   End
   Begin VB.Frame Frame7 
      Caption         =   "Folio"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1335
      Left            =   1800
      TabIndex        =   29
      Top             =   120
      Visible         =   0   'False
      Width           =   6615
      Begin VB.CommandButton Command6 
         Caption         =   "buscar"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   5280
         TabIndex        =   31
         Top             =   840
         Width           =   1215
      End
      Begin VB.TextBox Text4 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   720
         TabIndex        =   30
         Top             =   840
         Width           =   4095
      End
      Begin MSComctlLib.ImageCombo ImageCombo2 
         Height          =   345
         Left            =   720
         TabIndex        =   53
         Top             =   360
         Width           =   2535
         _ExtentX        =   4471
         _ExtentY        =   609
         _Version        =   393216
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Text            =   "ImageCombo2"
      End
      Begin VB.Label Label13 
         Caption         =   "Colegio"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   54
         Top             =   360
         Width           =   615
      End
      Begin VB.Label Label7 
         Caption         =   "Folio"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   32
         Top             =   840
         Width           =   615
      End
   End
   Begin VB.Frame Frame6 
      Caption         =   "Apoderado"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1335
      Left            =   1800
      TabIndex        =   16
      Top             =   120
      Visible         =   0   'False
      Width           =   6615
      Begin VB.TextBox Text2 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   5160
         TabIndex        =   24
         Top             =   360
         Width           =   1335
      End
      Begin VB.TextBox Text1 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   720
         TabIndex        =   23
         Top             =   360
         Width           =   3975
      End
      Begin VB.CommandButton Command3 
         Caption         =   "Ver"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   5280
         TabIndex        =   17
         Top             =   840
         Width           =   1215
      End
      Begin VB.Label Label4 
         Caption         =   "Run"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   4800
         TabIndex        =   26
         Top             =   360
         Width           =   375
      End
      Begin VB.Label Label3 
         Caption         =   "Nombre"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   25
         Top             =   360
         Width           =   855
      End
   End
End
Attribute VB_Name = "Form_mant_ntcr"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Flag_sub As Boolean

Private Sub Command1_Click()
    Dim Sql As String
    If Check1.Value = 1 Then
        Sql = "AND folio_fisico_ntcr <> 0 "
    End If
    
    Sql = "AND fecha_ntcr <= '" & Format(DTPicker2.Value, "yyyy-mm-dd") & "' and fecha_ntcr >= '" & Format(DTPicker1.Value, "yyyy-mm-dd") & "';"
    SeteaGrilla
    LlenaGrilla Sql
    
End Sub

Private Sub Command10_Click()
    If Trim(grillantcr.TextMatrix(grillantcr.Row, 5)) <> "nula" Then
        Frame10.Visible = True
        Label8.Caption = Trim(grillantcr.TextMatrix(grillantcr.Row, 4))
    End If
End Sub

Private Sub Command11_Click()
    Text3.Text = ""
    DTPicker3.Value = Date
    Frame11.Visible = True
End Sub

Private Sub Command12_Click()
Dim accion_detalle As String
Dim rec As ADODB.Recordset
Dim NI As Long
    If val(Text3.Text) = 0 Then
        MsgBox "Folio Invalido.", vbExclamation, "Faltan datos."
    End If
    If MsgBox("¿Está seguro qué la fecha de anulación, " & DTPicker3.Value & " , del folio " & Text3.Text & " es correcta?", vbExclamation + vbYesNo, "VALIDACIÓN") = vbNo Then Exit Sub
    Set rec = New ADODB.Recordset
    rec.Open "SELECT * FROM fnza_ntcr WHERE folio_fisico_ntcr=" & val(Text3.Text) & " AND colegio='" & Trim(ImageCombo1.SelectedItem.Key) & "';", conn
        If rec.RecordCount > 0 Then
            MsgBox "La Nota de Crédito ya existe en el sistema.", vbExclamation, "ALERTA DE VALIDACIÓN"
            Exit Sub
        End If
    rec.Close
    conn.Execute "INSERT fnza_ntcr(fecha_ingreso,usuario_ingreso,fecha_ntcr,run_apo,folio_fisico_ntcr,tipo_pago,colegio,estado_ntcr,monto_ntcr) VALUES(NOW(),'" & Nom_com_usu_ses & "','" & Format(DTPicker3.Value, "yyyy-mm-dd") & "','00000000-0','" & val(Text3.Text) & "','otro','" & Trim(ImageCombo1.SelectedItem.Key) & "','nula','0');", NI
    If NI = 1 Then
        MsgBox "La Nota de Crédito fue anulada exitosamente.", vbInformation, "OPERACIÓN ÉXITOSA"
        accion_detalle = "La boleta con folio fisico " & Text3.Text _
                       & " y monto 0 fue anulada exitosamente"
    ElseIf NI < 1 Then
        MsgBox "La Nota de Crédito no pudo ser anulada.", vbExclamation, "OPERACIÓN FALLIDA"
    ElseIf NI > 1 Then
        MsgBox "La Nota de credito fue anulada redundantemente.", vbCritical, "OPERACIÓN ERRONEA"
        accion_detalle = "La boleta con folio fisico " & Text3.Text _
                       & " y monto 0 fue anulada redundantemente"
    End If
    'Log fnza_historico_log
    Call Inserta_Vitacora_Finanza("", "00000000-0", _
                                  "Ingresar Nota de Credito nula", _
                                  accion_detalle, 0, 0)
    'Fin log
    Command13_Click
End Sub

Private Sub Command13_Click()
    Frame11.Visible = False
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub SeteaGrilla()
    grillantcr.ClearStructure
    grillantcr.Rows = 2
    grillantcr.FormatString = "<Folio |<Monto Credito|<Apoderado|<Fecha|<FolioNTCR|<FolioNTCR|<COLEGIO"
    grillantcr.ColWidth(0) = 700
    grillantcr.ColWidth(1) = 1100
    grillantcr.ColWidth(2) = 3500
    grillantcr.ColWidth(3) = 1000
    grillantcr.ColWidth(4) = 0
    grillantcr.ColWidth(5) = 0
    grillantcr.ColWidth(6) = 1100
End Sub

Private Sub LlenaGrilla(Filtro As String)
    Dim QR As String
    Dim RC As ADODB.Recordset
    Set RC = New ADODB.Recordset
    
    QR = "SELECT  fn.folio_ntcr, fn.fecha_ntcr, fn.run_apo, fn.folio_fisico_ntcr, fn.tipo_pago, fn.colegio, fn.monto_ntcr, concat(a.ape1_apo,' ', a.ape2_apo,' ', a.noms_apo) as nombre, fn.estado_ntcr FROM fnza_ntcr fn, apoderados a where fn.run_apo = a.rut_apo " & Filtro
    
    RC.Open QR, conn
    If RC.RecordCount = 0 Then
        RC.Close
        Exit Sub
    End If
    For I = 1 To RC.RecordCount
        grillantcr.AddItem RC("folio_fisico_ntcr") & Chr(9) & RC("monto_ntcr") & Chr(9) & RC("nombre") & Chr(9) & RC("fecha_ntcr") & Chr(9) & RC("folio_ntcr") & Chr(9) & RC("estado_ntcr") & Chr(9) & RC("colegio"), I
        grillantcr.Col = 0
        grillantcr.Row = I
        grillantcr.RowSel = I
        grillantcr.ColSel = grillantcr.Cols - 1
            If (RC("estado_ntcr") = "nula") Then
            grillantcr.CellBackColor = &HC0C0FF
        End If
        RC.MoveNext
    Next I
    RC.Close
    grillantcr.SetFocus
End Sub

Private Sub Command3_Click()
     Dim Sql As String
'
'    sql = "AND folio_fisico_ntcr = 0;"
'    SeteaGrilla
'    LlenaGrilla sql

    If Check1.Value = 1 Then
        Sql = "AND folio_fisico_ntcr <> 0 " & "AND run_apo = '" & text2.Text & "'"
    Else
        Sql = "AND run_apo = '" & text2.Text & "'"
    End If
       
    SeteaGrilla
    LlenaGrilla Sql
End Sub

Private Sub Command4_Click()
    Dim accion_detalle, run_apo As String
    Dim objRS As ADODB.Recordset
    Set objRS = New ADODB.Recordset
    Dim Sql As String
    Dim rs As ADODB.Recordset
    Set rs = New ADODB.Recordset
    
    'Obtengo rut
    Sql = "select run_apo from fnza_ntcr where folio_ntcr = '" & Label8.Caption & "'"
    objRS.Open Sql, conn
    If Not objRS.EOF Then
        run_apo = objRS("run_apo")
    End If
    objRS.Close
    
    Sql = "UPDATe fnza_detalle_ntcr SET nulo='SI' WHERE folio_dtll_ntcr = " & GrillaDetaNtcr.TextMatrix(GrillaDetaNtcr.Row, 3)
    conn.Execute Sql
    abonar_detalle GrillaDetaNtcr.TextMatrix(GrillaDetaNtcr.Row, 4), GrillaDetaNtcr.TextMatrix(GrillaDetaNtcr.Row, 1), Date, conn
    Command5_Click
    
    'Log fnza_historico_log
        accion_detalle = "Se ha anulado el detalle de la nota de credito con folio_ntcr " _
                       & Label8.Caption & " y monto " _
                       & GrillaDetaNtcr.TextMatrix(GrillaDetaNtcr.Row, 1)
        Call Inserta_Vitacora_Finanza("", CStr(run_apo), "Anular detalle de Nota de Credito", _
                                      CStr(accion_detalle), 0, 0)
    'Fin log
    
    Sql = "SELECT count(*) as suma from fnza_detalle_ntcr WHERE nulo = 'NO' AND folio_ntcr = '" & Label8.Caption & "';"
    rs.Open Sql, conn
    If rs("suma") = 0 Then
        Sql = "UPDATE fnza_ntcr SET estado_ntcr = 'nula' WHERE folio_ntcr = '" & Label8.Caption & "';"
        conn.Execute Sql
        'Log fnza_historico_log
        accion_detalle = "Se ha anulado la nota de credito con folio_ntcr " _
                       & Label8.Caption & " y monto " _
                       & grillantcr.TextMatrix(grillantcr.Row, 1)
        Call Inserta_Vitacora_Finanza("", CStr(run_apo), "Anular detalle de Nota de Credito", _
                                      CStr(accion_detalle), 0, 0)
        'Fin log
    End If
End Sub

Private Sub Command5_Click()
    Frame8.Visible = False
    SeteaGrillaDeta
    LlenaGrillaDeta
End Sub

Private Sub Command6_Click()
    Dim Sql As String
    Sql = "AND folio_fisico_ntcr = '" & val(Text4.Text) & "' AND fn.colegio='" & ImageCombo2.SelectedItem.Key & "';"
    SeteaGrilla
    LlenaGrilla Sql
End Sub

Private Sub Command7_Click()
    Dim Sql As String
    
    Sql = "AND folio_fisico_ntcr = '0' ;"
    SeteaGrilla
    LlenaGrilla Sql
End Sub

Private Sub Command8_Click()
    Dim Sql As String
    Dim accion_detalle, run_apo As String
    Dim rs As ADODB.Recordset
    Dim objRS As ADODB.Recordset
    Set objRS = New ADODB.Recordset
    
    'Obtengo rut
    Sql = "select run_apo from fnza_ntcr where folio_ntcr = '" & Label8.Caption & "'"
    objRS.Open Sql, conn
    If Not objRS.EOF Then
        run_apo = objRS("run_apo")
    End If
    objRS.Close
    
    If Label8.Caption = "" Then
        MsgBox "No hay Notas de crédito seleccionadas", vbExclamation, "Falta Información."
        Exit Sub
    End If
    Set rs = New ADODB.Recordset
    Sql = "SELECT * from fnza_detalle_ntcr WHERE nulo = 'NO' AND folio_ntcr = '" & Label8.Caption & "';"
    rs.Open Sql, conn
    While Not rs.EOF
        Sql = "UPDATe fnza_detalle_ntcr SET nulo='SI' WHERE folio_dtll_ntcr = " & rs("folio_dtll_ntcr")
        conn.Execute Sql
        abonar_detalle rs("folio_dtll_rel"), rs("monto_pago"), Date, conn
        'Log fnza_historico_log
        accion_detalle = "Se ha anulado el detalle de la nota de credito con folio_ntcr " _
                       & Label8.Caption & " y monto " _
                       & rs("monto_pago")
        Call Inserta_Vitacora_Finanza("", run_apo, "Anular Nota de Credito", _
                                      CStr(accion_detalle), 0, 0)
        'Fin log
        rs.MoveNext
    Wend
    Sql = "UPDATE fnza_ntcr SET estado_ntcr = 'nula' WHERE folio_ntcr = '" & Label8.Caption & "';"
    conn.Execute Sql
    'Log fnza_historico_log
        accion_detalle = "Se ha anulado la nota de credito con folio_ntcr " _
                       & Label8.Caption & " y monto " _
                       & grillantcr.TextMatrix(grillantcr.Row, 1)
        Call Inserta_Vitacora_Finanza("", run_apo, "Anular Nota de Credito", _
                                      CStr(accion_detalle), 0, 0)
    'Fin log
    Command9_Click
End Sub

Private Sub Command9_Click()
    Frame10.Visible = False
    SeteaGrilla
    SeteaGrillaDeta
End Sub

Private Sub Form_Load()
    ImageCombo1.ComboItems.Add 1, RetornaCampo("CFG", "valor", "param='CODBC'", conn), RetornaCampo("hist_cod_colegio", "nombre", "colegio='" & RetornaCampo("CFG", "valor", "param='CODBC'", conn) & "'", conn)
    ImageCombo1.ComboItems.Add 2, RetornaCampo("CFG", "valor", "param='CODPK'", conn), RetornaCampo("hist_cod_colegio", "nombre", "colegio='" & RetornaCampo("CFG", "valor", "param='CODPK'", conn) & "'", conn)
    Set ImageCombo1.SelectedItem = ImageCombo1.ComboItems(1)
    ImageCombo2.ComboItems.Add 1, RetornaCampo("CFG", "valor", "param='CODBC'", conn), RetornaCampo("hist_cod_colegio", "nombre", "colegio='" & RetornaCampo("CFG", "valor", "param='CODBC'", conn) & "'", conn)
    ImageCombo2.ComboItems.Add 2, RetornaCampo("CFG", "valor", "param='CODPK'", conn), RetornaCampo("hist_cod_colegio", "nombre", "colegio='" & RetornaCampo("CFG", "valor", "param='CODPK'", conn) & "'", conn)
    Set ImageCombo2.SelectedItem = ImageCombo2.ComboItems(1)
    DTPicker1.Value = Date
    DTPicker2.Value = Date
    End Sub



Private Sub GrillaDetaNtcr_Click()
    If GrillaDetaNtcr.TextMatrix(GrillaDetaNtcr.Row, 1) <> "" And GrillaDetaNtcr.TextMatrix(GrillaDetaNtcr.Row, 5) = "NO" Then
        Frame8.Visible = True
        Label8.Caption = Trim(grillantcr.TextMatrix(grillantcr.Row, 4))
    End If
End Sub

Private Sub grillantcr_Click()
    SeteaGrillaDeta
    LlenaGrillaDeta
End Sub
Private Sub SeteaGrillaDeta()
    GrillaDetaNtcr.ClearStructure
    GrillaDetaNtcr.Rows = 2
    GrillaDetaNtcr.FormatString = "<Folio Boleta|<Monto Credito|<Glosa|<folio_deta_ntcr|<folioDTLL|<nulo"
    GrillaDetaNtcr.ColWidth(0) = 1000
    GrillaDetaNtcr.ColWidth(1) = 1100
    GrillaDetaNtcr.ColWidth(2) = 3000
    GrillaDetaNtcr.ColWidth(3) = 0
    GrillaDetaNtcr.ColWidth(4) = 0
    GrillaDetaNtcr.ColWidth(5) = 0
End Sub

Private Sub LlenaGrillaDeta()
    Dim QR As String
    Dim RC As ADODB.Recordset
    Set RC = New ADODB.Recordset
    
    QR = "select fdn.*, fg.*, fb.* from fnza_detalle_ntcr fdn, fnza_ntcr fn, fnza_glosa fg,fnza_boletas fb where fdn.folio_ntcr = fn.folio_ntcr and fn.folio_ntcr = '" & Trim(grillantcr.TextMatrix(grillantcr.Row, 4)) & "' and fg.cod_glosa = fdn.cod_glosa AND fdn.blta_rel = fb.folio_blta;"
    RC.Open QR, conn
    For I = 1 To RC.RecordCount
        GrillaDetaNtcr.AddItem RC("folio_blta_fisico") & Chr(9) & RC("monto_pago") & Chr(9) & RC("descripcion") & Chr(9) & RC("folio_dtll_ntcr") & Chr(9) & RC("folio_dtll_rel") & Chr(9) & RC("nulo"), I
        GrillaDetaNtcr.Col = 0
        GrillaDetaNtcr.Row = I
        GrillaDetaNtcr.RowSel = I
        GrillaDetaNtcr.ColSel = 3
        If (RC("nulo") = "SI") Then
            GrillaDetaNtcr.CellBackColor = &HC0C0FF
        End If
        RC.MoveNext
    Next I
    RC.Close
End Sub

Private Sub List1_DblClick()
    Dim RC As ADODB.Recordset
    Dim Sql As String
    
    Text1.Text = List1.Text
    List1.Visible = False
    List2.Visible = False
    Set RC = New ADODB.Recordset
    RC.Open "SELECT rut_apo FROM `apoderados` where left(CONCAT(ape1_apo,' ',ape2_apo,' ',noms_apo)," & Len(Text1.Text) & ")='" & Text1.Text & "' ORDER BY ape1_apo, ape2_apo, noms_apo;", conn
    RC.MoveFirst
    Flag_sub = True
    text2.Text = RC("rut_apo")
    RC.Close
    Flag_sub = False
    
'    If Check1.Value = 1 Then
'        sql = "AND folio_fisico_ntcr <> 0 "
'    End If
'
'    sql = "AND run_apo = '" & Text2.Text & "';"
'    SeteaGrilla
'    LlenaGrilla sql
End Sub


Private Sub List2_DblClick()
    Dim RC As ADODB.Recordset
    Dim Sql As String
    text2.Text = List2.Text
    List2.Visible = False
    List1.Visible = False
    Set RC = New ADODB.Recordset
    RC.Open "SELECT CONCAT(ape1_apo,' ',ape2_apo,' ',noms_apo) as nombre_apo FROM apoderados where rut_apo='" & text2.Text & "' ORDER BY rut_apo;", conn
    RC.MoveFirst
    Flag_sub = True
    Text1.Text = RC("nombre_apo")
    RC.Close
    Flag_sub = False
'    If Check1.Value = 1 Then
'        sql = "AND folio_fisico_ntcr <> 0 "
'    End If
'
'    sql = "AND run_apo = '" & Text2.Text & "';"
'    SeteaGrilla
'    LlenaGrilla sql
End Sub

Private Sub Option1_Click(Index As Integer)
    Frame2.Visible = False
    Frame6.Visible = False
    Frame7.Visible = False
    Frame9.Visible = False
    List1.Visible = False
    List2.Visible = False
    Check1.Visible = True
    Select Case Index
        Case 0: Frame2.Visible = True
        Case 1: Frame6.Visible = True
        Case 2: Check1.Visible = False
                Frame7.Visible = True
        Case 3: Frame9.Visible = True
                Check1.Visible = False
    End Select
    limpia_datos
End Sub

Private Sub Text1_Change()
    Dim Sql As String
    Dim RC As ADODB.Recordset
    ' Si el cambio lo hace un Sub no hacer nada
    If Flag_sub Then Exit Sub
    If Text1.Text = "" Then Exit Sub
    Set RC = New ADODB.Recordset
    'sql = "SELECT DISTINCT a.ape1_apo, a.ape2_apo, a.noms_apo FROM apoderados a, fnza_mensualidad fm where left(CONCAT(a.ape1_apo,' ',a.ape2_apo,' ',a.noms_apo)," & Len(Text1.Text) & ")='" & Text1.Text & "' and a.rut_apo=fm.run_apo ORDER BY a.ape1_apo, a.ape2_apo, a.noms_apo;"
    
    Sql = "select nt.* from" _
       & " (SELECT DISTINCT a.rut_apo,a.ape1_apo, a.ape2_apo, a.noms_apo" _
       & " FROM apoderados a, fnza_mensualidad fm" _
       & " where left(CONCAT(a.ape1_apo,' ',a.ape2_apo,' ',a.noms_apo)," & Len(Text1.Text) & ")='" & Text1.Text & "' and a.rut_apo=fm.run_apo" _
       & " ORDER BY a.ape1_apo, a.ape2_apo, a.noms_apo) as nt," _
       & " fnza_ntcr As fnt" _
       & " Where nt.Rut_apo = fnt.run_apo" _
       & " group by nt.rut_apo"
    
    RC.Open Sql, conn
    List1.Clear
    While Not (RC.EOF)
        List1.AddItem RC("ape1_apo") & " " & RC("ape2_apo") & " " & RC("noms_apo")
        RC.MoveNext
    Wend
    RC.Close
    List1.Visible = True
    List2.Visible = False
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        If (List1.ListCount = 0) Then
            Exit Sub
        End If
        List1.Selected(0) = True
        Flag_sub = True
        Text1.Text = List1.Text
        Flag_sub = False
        Call List1_DblClick
    End If
    KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub

Private Sub Text2_Change()
    Dim RC As ADODB.Recordset
    Set RC = New ADODB.Recordset
    ' Si el cambio lo hace un Sub no hacer nada
    If Flag_sub Then Exit Sub
    If text2.Text = "" Then Exit Sub
    
    Dim Str_Query As String
    RC.CursorLocation = adUseClient
    'Str_Query = "SELECT DISTINCT fm.run_apo FROM apoderados a, fnza_mensualidad fm WHERE left(a.rut_apo," & Len(Text2.Text) & ")='" & Text2.Text & "' AND a.rut_apo=fm.run_apo ORDER BY a.rut_apo;"
    
    Str_Query = "select nt.* from" _
              & " (SELECT DISTINCT fm.run_apo" _
              & " FROM apoderados a, fnza_mensualidad fm WHERE left(a.rut_apo," & Len(text2.Text) & ")='" & text2.Text & "' AND a.rut_apo=fm.run_apo" _
              & " ORDER BY a.rut_apo) as nt,fnza_ntcr as fnt" _
              & " Where nt.run_apo = fnt.run_apo" _
              & " group by nt.run_apo"
        
    RC.Open Str_Query, conn
    List2.Clear
    While Not (RC.EOF)
        List2.AddItem RC("run_apo")
        RC.MoveNext
    Wend
    RC.Close
    List2.Visible = True
    List1.Visible = False
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        If (List2.ListCount = 0) Then
            Exit Sub
        End If
        List2.Selected(0) = True
        Flag_sub = True
        text2.Text = List2.Text
        Flag_sub = False
        Call List2_DblClick
    End If
    KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub

Public Sub limpia_datos()
    Dim I As Integer
    Text1.Text = ""
    text2.Text = ""
    List1.Clear
    List2.Clear
    Check1.Value = 0
    DTPicker1.Value = Date
    DTPicker2.Value = Date
    Text4.Text = ""
    grillantcr.Rows = 2
    GrillaDetaNtcr.Rows = 2
    For I = 0 To grillantcr.Cols - 1
        grillantcr.TextMatrix(1, I) = ""
    Next I
    For I = 0 To GrillaDetaNtcr.Cols - 1
        GrillaDetaNtcr.TextMatrix(1, I) = ""
    Next I
End Sub
