Sub cancel_Click () Unload setup If maildir = "" Then MsgBox ("Setup Needs to Be Performed before OGMAIL Can Be Run") End End If End Sub Sub ok_btn_Click () On Error Resume Next ' ' First we verify that a user name is specified ' If usename.text = "" Then ans% = MsgBox("No User Name Specified" + Chr$(10) + "Press Ok to Edit", 17, "OGMAIL - Setup Error") If ans% = 1 Then usename.SetFocus Else cancel_Click End If Exit Sub End If ' ' Now we will check to see if the postbox path is specified ' If pbox.text = "" Then ans% = MsgBox("No Post Box Directory Specified" + Chr$(10) + "Press Ok to Edit", 17, "OGMAIL - Setup Error") If ans% = 1 Then pbox.SetFocus Else cancel_Click End If Exit Sub Else ChDir pbox.text If Err = 76 Then ans% = MsgBox("Post Box Directory Specified Does Not Exist" + Chr$(10) + "Press Ok to Create", 17, "OGMAIL - Setup Error") If ans% = 1 Then MkDir pbox.text If Err > 0 Then ans% = MsgBox("Cannot Create Post Box Directory Specified " + Chr$(10) + "Press Ok to Edit Path", 17, "OGMAIL - Setup Error") If ans% = 1 Then pbox.SetFocus Exit Sub Else cancel_Click Exit Sub End If End If Else cancel_Click Exit Sub End If End If End If ' ' Now we will save the default setup parameters to the ' ogmail.ini file ' username = usename.text maildir = pbox.text If (Mid$(maildir, Len(maildir), 1)) <> "\" Then maildir = maildir + "\" End If Open namefile For Output As #1 Write #1, username Write #1, maildir Close #1 ' ' Now we will add the current users name to the ' users file in the post box directory ' Open maildir + "users" For Append As #7 Write #7, username Close #7 setupflag = True Unload setup End Sub