bueno lo q quiero es q cada vez q se haga click en el buttom se cree un archivo llamado 1.txt, y si este ya existe q sea 2.txt y asi sucesivamente
pero en el caso de q yo borre el archivo 1.txt, si le hago click al buttom no cree uno q se llame 3.txt sino q cree de nuevo el 1.txt
hice este code y no se q hice mal pero solo crea el archivo 1.txt y nada mas
Private Sub Command1_Click()
Dim I As Byte
For I = 1 To 255
If Dir("C:\Probar" & I & ".txt") = "" Then
Open "C:\Probar\" & I & ".txt" For Binary As #1
Put #1, 1, "JAJA"
Close #1
Exit For
End If
Next I
End Sub
P/D: para aquel q le interese el code... el error esta en la 4º linea me comi el "\" desp de "Probar" , tiene q quedar "Probar\"...
perdon x abir un tema nuevo x algo q desp me di cuenta xD
borrenlo moderadores si molesta xD
SALUDOS