Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Bilancio familiare - frmArchivio.frm

frmArchivio.frm

Caricato da: Roberto VB
Scarica il programma completo

  1. Option Explicit
  2.  
  3. Private Sub cmdIndietro_Click()
  4.     Unload Me
  5. End Sub
  6.  
  7. Private Sub cmdOK_Click()
  8. On Error GoTo errore
  9.     Select Case cboMese.ListIndex
  10.         Case Is = 0
  11.             Open App.Path & "\1-" & CInt(txtAnno.Text) & ".dat" For Random As #1
  12.                 Riepilogo
  13.         Case Is = 1
  14.             Open App.Path & "\2-" & CInt(txtAnno.Text) & ".dat" For Random As #1
  15.                 Riepilogo
  16.         Case Is = 2
  17.             Open App.Path & "\3-" & CInt(txtAnno.Text) & ".dat" For Random As #1
  18.                 Riepilogo
  19.         Case Is = 3
  20.             Open App.Path & "\4-" & CInt(txtAnno.Text) & ".dat" For Random As #1
  21.                 Riepilogo
  22.         Case Is = 4
  23.             Open App.Path & "\5-" & CInt(txtAnno.Text) & ".dat" For Random As #1
  24.                 Riepilogo
  25.         Case Is = 5
  26.             Open App.Path & "\6-" & CInt(txtAnno.Text) & ".dat" For Random As #1
  27.                 Riepilogo
  28.         Case Is = 6
  29.             Open App.Path & "\7-" & CInt(txtAnno.Text) & ".dat" For Random As #1
  30.                 Riepilogo
  31.         Case Is = 7
  32.             Open App.Path & "\8-" & CInt(txtAnno.Text) & ".dat" For Random As #1
  33.                 Riepilogo
  34.         Case Is = 8
  35.             Open App.Path & "\9-" & CInt(txtAnno.Text) & ".dat" For Random As #1
  36.                 Riepilogo
  37.         Case Is = 9
  38.             Open App.Path & "\10-" & CInt(txtAnno.Text) & ".dat" For Random As #1
  39.                 Riepilogo
  40.         Case Is = 10
  41.             Open App.Path & "\11-" & CInt(txtAnno.Text) & ".dat" For Random As #1
  42.                 Riepilogo
  43.         Case Is = 11
  44.             Open App.Path & "\12-" & CInt(txtAnno.Text) & ".dat" For Random As #1
  45.                 Riepilogo
  46.     End Select
  47.     Unload Me
  48.     Exit Sub
  49. errore:
  50.     MsgBox Err.Description, vbExclamation, "ERRORE!"
  51. End Sub
  52. Private Sub Riepilogo()
  53.     Dim Testo As String
  54.     Dim a() As String
  55.     Dim i As Integer
  56.     Get #1, 1, Testo
  57.         a = Split(Testo, ":")
  58.         'RIMETTO A POSTO TUTTI I DATI PRECEDENTEMENTE SALVATI
  59.         For i = LBound(a) To UBound(a)
  60.             frmMain.txtGas.Text = a(0)
  61.             frmMain.txtTelefono.Text = a(1)
  62.             frmMain.txtAcqua.Text = a(2)
  63.             frmMain.txtSpazzatura.Text = a(3)
  64.             frmMain.txtEnel.Text = a(4)
  65.             frmMain.txtSKY.Text = a(5)
  66.             frmMain.txtGiornali.Text = a(6)
  67.             frmMain.txtAssicurazione.Text = a(7)
  68.             frmMain.txtCondominio.Text = a(8)
  69.             frmMain.txtMutuo.Text = a(9)
  70.             frmMain.txtFinanziamento.Text = a(10)
  71.             frmMain.txtPensione.Text = a(11)
  72.             frmMain.txtMacchina.Text = a(12)
  73.             frmMain.txtBenzina.Text = a(13)
  74.             frmMain.txtADSL.Text = a(14)
  75.             frmMain.txtRicariche.Text = a(15)
  76.             frmMain.txtExtraUscite.Text = a(16)
  77.             frmMain.txtAlimenti.Text = a(17)
  78.             frmMain.txtVestiario.Text = a(18)
  79.             frmMain.txtBeni.Text = a(19)
  80.             frmMain.txtRegali.Text = a(20)
  81.             frmMain.txtMedicine.Text = a(21)
  82.             frmMain.txtCasa.Text = a(22)
  83.             frmMain.txtMeccanico.Text = a(23)
  84.             frmMain.txtViaggi.Text = a(24)
  85.             frmMain.txtScuola.Text = a(25)
  86.             frmMain.txtUniversita.Text = a(26)
  87.             frmMain.txtRAI.Text = a(27)
  88.             frmMain.txtExtraUsciteVariabili.Text = a(28)
  89.             frmMain.txtExtraUscite.Text = a(28)
  90.             frmMain.txtStipendioMarito.Text = a(29)
  91.             frmMain.txtStipendioMoglie.Text = a(30)
  92.             frmMain.txtFondi.Text = a(31)
  93.             frmMain.txtExtra.Text = a(32)
  94.         Next
  95.     frmMain.mnuModificaValori.Enabled = True
  96.     frmMain.mnuModificaAzzera.Enabled = True
  97.     frmMain.lblRiepilogo.Visible = True
  98.     Close #1
  99. End Sub
  100.  
  101. Private Sub Form_Load()
  102.     cboMese.AddItem "Gennaio", 0
  103.     cboMese.AddItem "Febbraio", 1
  104.     cboMese.AddItem "Marzo", 2
  105.     cboMese.AddItem "Aprile", 3
  106.     cboMese.AddItem "Maggio", 4
  107.     cboMese.AddItem "Giugno", 5
  108.     cboMese.AddItem "Luglio", 6
  109.     cboMese.AddItem "Agosto", 7
  110.     cboMese.AddItem "Settembre", 8
  111.     cboMese.AddItem "Ottobre", 9
  112.     cboMese.AddItem "Novembre", 10
  113.     cboMese.AddItem "Dicembre", 11
  114. End Sub