FormPlantilla.frm, imagen del formulario

Uso: es la pantalla que permite ingresar los datos a la plantilla, algunas ventanas se hacen invisibles dependiendo si tienen o no una variable asociada

FormPlantilla.frm
Private Sub UserForm_Initialize()
________Close
________Open arfijo For Random As 1 Len = largof
________Get 1, 1, fij
________Close
________nombre_plantilla_actual = plantilla
________Close
________Open archconf For Random As 1 Len = largoC
________Get 1, 1, conf
________ultimo = Val(conf.nombre)
________For z% = 2 To ultimo + 1
________________Get 1, z%, conf
________________If Trim(conf.nombre) = nombre_plantilla_actual Then
________________FormPlantilla.Caption = conf.nombre
________________Label1.Caption = conf.Label1
________________Label2.Caption = conf.Label2
________________Label3.Caption = conf.Label3
________________Label4.Caption = conf.Label4
________________Label5.Caption = conf.Label5
________________Label6.Caption = conf.Label6
________________Label7.Caption = conf.Label7
________________Label8.Caption = conf.Label8
________________Label9.Caption = conf.Label9
________________Label10.Caption = conf.Label10
________________If Trim(Label1.Caption) = "" Then ComboBox1.Visible = False
________________If Trim(Label2.Caption) = "" Then ComboBox2.Visible = False
________________If Trim(Label3.Caption) = "" Then ComboBox3.Visible = False
________________If Trim(Label4.Caption) = "" Then ComboBox4.Visible = False
________________If Trim(Label5.Caption) = "" Then TextBox1.Visible = False
________________If Trim(Label6.Caption) = "" Then TextBox2.Visible = False
________________If Trim(Label7.Caption) = "" Then TextBox3.Visible = False
________________If Trim(Label8.Caption) = "" Then TextBox4.Visible = False
________________If Trim(Label9.Caption) = "" Then TextBox5.Visible = False
________________If Trim(Label10.Caption) = "" Then TextBox6.Visible = False
________________ComboBox1.AddItem Trim(conf.comb11)
________________ComboBox1.AddItem Trim(conf.comb12)
________________ComboBox1.AddItem Trim(conf.comb13)
________________ComboBox2.AddItem Trim(conf.comb21)
________________ComboBox2.AddItem Trim(conf.comb22)
________________ComboBox2.AddItem Trim(conf.comb23)
________________ComboBox3.AddItem Trim(conf.comb31)
________________ComboBox3.AddItem Trim(conf.comb32)
________________ComboBox3.AddItem Trim(conf.comb33)
________________ComboBox4.AddItem Trim(conf.comb41)
________________ComboBox4.AddItem Trim(conf.comb42)
________________ComboBox4.AddItem Trim(conf.comb43)
________________ComboBox1.Text = ComboBox1.List(0)
________________ComboBox2.Text = ComboBox2.List(0)
________________ComboBox3.Text = ComboBox3.List(0)
________________ComboBox4.Text = ComboBox4.List(0)
____________End If
________Next z%
End Sub

Sub agregar()
________Open archivo For Random As 1
Rem leer el indice, incrementar y grabarlo
________Get 1, 1, dat
________ultimo = Val(dat.nombre)
________If Val(ultimo) = 0 Then ultimo = 1
________puntero = ultimo + 1
________dat.nombre = puntero
________Put 1, 1, lib
Rem puntero almacena la posicion donde debe grabarse el nuevo registro
________histo.fecha = Xfecha
________histo.rol = Xrol
________histo.caratula = Xcaratula
________histo.documento = Xdocumento
________histo.movimiento = Xmovimiento
________Put 1, puntero, dat
________Close
End Sub