|
Option Explicit
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
frmLista.Lbldettagli.Visible = False
End Sub
Private Sub mnunumfilms_Click()
Dim n5 As Integer, a As Integer
Dim n6 As Integer
Dim l As String, strl As String
l = Frmdettagli.Text1.Text
n6 = FreeFile
n5 = FreeFile
Open "c:\numero.dat" For Output As #n5
Print #n5, l
Close #n5
Open "c:\numero.dat" For Input As #n6
While Not EOF(n6)
Line Input #n6, strl
a = a + 1
Wend
Close #n6
MsgBox "Il numero di films presenti è " & a - 1, vbInformation, "Films"
End Sub
|
|