Advertisement
jargon

basSaveFile.bas

Feb 23rd, 2013
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Attribute VB_Name = "basSaveFile"
  2. Public Sub SaveFile()
  3.     Dim Mode As Long, s_stamp As String, s_file As String
  4.     s_stamp = Stamp()
  5.     s_file = s_stamp + ".tgmath.txt"
  6.     Mode = FreeFile(0)
  7.     If Len(Dir(s_file)) > 0 Then
  8.         frmTgMath.txtDigits.Text = frmTgMath.txtDigits.Text & "Save collision! Please Wait a few moments and try again." & vbCrLf
  9.         Exit Sub
  10.     End If
  11.     Open s_file For Output As Mode
  12.     Print #Mode, frmTgMath.txtDigits.Text
  13.     Close Mode
  14.     frmTgMath.txtDigits.Text = frmTgMath.txtDigits.Text & "Save successful! " & s_file & vbCrLf
  15. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement