What I'm trying to make a regestration window come up only the first time the user runs this program. so can someone tell me what i'm doin wrong?
Code:Private Sub Command1_Click() If fso.FolderExists("c:\dimas password\") Then Open "C:\dimas password\01.dat" For Output As #1 Write #1, txtfn.Text, txtln.Text, txtcp.Text Close #1 Else: MkDir "C:\dimas password\" Open "C:\dimas password\01.dat" For Output As #1 Write #1, txtfn.Text, txtln.Text, txtcp.Text Close #1 End If End Sub Private Sub Form_Load() SetFormPosition Form1.hwnd, vbTopMost Set fso = CreateObject("Scripting.FileSystemObject") If fso.filexists("c:\dimas password\01.DAT") Then Form1.Visible = False user32.Visible = True End If End Sub




Reply With Quote