home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD14521242001.psc / FileSystem / Form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-02-04  |  20.8 KB  |  461 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "FileSystem Demo"
  5.    ClientHeight    =   7080
  6.    ClientLeft      =   36
  7.    ClientTop       =   312
  8.    ClientWidth     =   9264
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   7080
  13.    ScaleWidth      =   9264
  14.    StartUpPosition =   2  'CenterScreen
  15.    Begin VB.PictureBox Picture1 
  16.       Align           =   1  'Align Top
  17.       Height          =   1032
  18.       Left            =   0
  19.       ScaleHeight     =   984
  20.       ScaleWidth      =   9216
  21.       TabIndex        =   3
  22.       Top             =   0
  23.       Width           =   9264
  24.       Begin VB.CommandButton cmdAbout 
  25.          Caption         =   "About FileSystem"
  26.          BeginProperty Font 
  27.             Name            =   "Verdana"
  28.             Size            =   9
  29.             Charset         =   0
  30.             Weight          =   400
  31.             Underline       =   0   'False
  32.             Italic          =   0   'False
  33.             Strikethrough   =   0   'False
  34.          EndProperty
  35.          Height          =   852
  36.          Left            =   6720
  37.          Style           =   1  'Graphical
  38.          TabIndex        =   8
  39.          Top             =   60
  40.          Width           =   1212
  41.       End
  42.       Begin VB.CommandButton cmdReadMe 
  43.          Caption         =   "Show ReadMe"
  44.          BeginProperty Font 
  45.             Name            =   "Verdana"
  46.             Size            =   9
  47.             Charset         =   0
  48.             Weight          =   400
  49.             Underline       =   0   'False
  50.             Italic          =   0   'False
  51.             Strikethrough   =   0   'False
  52.          EndProperty
  53.          Height          =   852
  54.          Left            =   60
  55.          Style           =   1  'Graphical
  56.          TabIndex        =   7
  57.          Top             =   60
  58.          Width           =   1212
  59.       End
  60.       Begin VB.CommandButton cmdRun 
  61.          Caption         =   " Run FileSystem"
  62.          BeginProperty Font 
  63.             Name            =   "Verdana"
  64.             Size            =   9
  65.             Charset         =   0
  66.             Weight          =   400
  67.             Underline       =   0   'False
  68.             Italic          =   0   'False
  69.             Strikethrough   =   0   'False
  70.          EndProperty
  71.          Height          =   852
  72.          Left            =   2580
  73.          Style           =   1  'Graphical
  74.          TabIndex        =   6
  75.          Top             =   60
  76.          Width           =   1212
  77.       End
  78.       Begin VB.CommandButton cmdClose 
  79.          Caption         =   "Exit DemoApp"
  80.          BeginProperty Font 
  81.             Name            =   "Verdana"
  82.             Size            =   9
  83.             Charset         =   0
  84.             Weight          =   400
  85.             Underline       =   0   'False
  86.             Italic          =   0   'False
  87.             Strikethrough   =   0   'False
  88.          EndProperty
  89.          Height          =   852
  90.          Left            =   7980
  91.          Style           =   1  'Graphical
  92.          TabIndex        =   5
  93.          Top             =   60
  94.          Width           =   1212
  95.       End
  96.       Begin VB.CommandButton cmdList 
  97.          Caption         =   "List Functions"
  98.          BeginProperty Font 
  99.             Name            =   "Verdana"
  100.             Size            =   9
  101.             Charset         =   0
  102.             Weight          =   400
  103.             Underline       =   0   'False
  104.             Italic          =   0   'False
  105.             Strikethrough   =   0   'False
  106.          EndProperty
  107.          Height          =   852
  108.          Left            =   1320
  109.          Style           =   1  'Graphical
  110.          TabIndex        =   4
  111.          Top             =   60
  112.          Width           =   1212
  113.       End
  114.    End
  115.    Begin VB.ComboBox Combo1 
  116.       BeginProperty Font 
  117.          Name            =   "Verdana"
  118.          Size            =   9
  119.          Charset         =   0
  120.          Weight          =   400
  121.          Underline       =   0   'False
  122.          Italic          =   0   'False
  123.          Strikethrough   =   0   'False
  124.       EndProperty
  125.       Height          =   312
  126.       ItemData        =   "Form1.frx":0000
  127.       Left            =   5940
  128.       List            =   "Form1.frx":001F
  129.       Sorted          =   -1  'True
  130.       Style           =   2  'Dropdown List
  131.       TabIndex        =   1
  132.       Top             =   1080
  133.       Width           =   3252
  134.    End
  135.    Begin VB.TextBox Text1 
  136.       BackColor       =   &H80000006&
  137.       BeginProperty Font 
  138.          Name            =   "Courier New"
  139.          Size            =   10.2
  140.          Charset         =   0
  141.          Weight          =   400
  142.          Underline       =   0   'False
  143.          Italic          =   0   'False
  144.          Strikethrough   =   0   'False
  145.       EndProperty
  146.       ForeColor       =   &H0080FF80&
  147.       Height          =   5532
  148.       Left            =   120
  149.       MultiLine       =   -1  'True
  150.       ScrollBars      =   3  'Both
  151.       TabIndex        =   0
  152.       Top             =   1440
  153.       Width           =   9072
  154.    End
  155.    Begin VB.Label Label2 
  156.       Caption         =   "Pick a drive letter where you want the fileio functions to work"
  157.       BeginProperty Font 
  158.          Name            =   "Verdana"
  159.          Size            =   9
  160.          Charset         =   0
  161.          Weight          =   400
  162.          Underline       =   0   'False
  163.          Italic          =   0   'False
  164.          Strikethrough   =   0   'False
  165.       EndProperty
  166.       Height          =   252
  167.       Left            =   120
  168.       TabIndex        =   2
  169.       Top             =   1110
  170.       Width           =   5712
  171.    End
  172. Attribute VB_Name = "Form1"
  173. Attribute VB_GlobalNameSpace = False
  174. Attribute VB_Creatable = False
  175. Attribute VB_PredeclaredId = True
  176. Attribute VB_Exposed = False
  177. Option Explicit
  178. Private Sub cmdClose_Click()
  179.     Unload Me
  180. End Sub
  181. Private Sub cmdList_Click()
  182.     ListFunctions
  183. End Sub
  184. Private Sub cmdReadMe_Click()
  185.     ShowReadMe
  186. End Sub
  187. Private Sub cmdAbout_Click()
  188.     ShowAbout
  189. End Sub
  190. Private Sub cmdRun_Click()
  191.     If Combo1.Text = "" Then
  192.         MsgBox "Please pick a drive letter first"
  193.         On Error Resume Next
  194.         Combo1.SetFocus
  195.         Exit Sub
  196.     End If
  197.     RunThis Combo1.Text
  198. End Sub
  199. Private Sub RunThis(ByVal Drive As String)
  200.     Dim Path As String
  201.     Dim Filename As String
  202.     Dim hFile As Long
  203.     Dim Root As String
  204.     Dim FilePath As String
  205.     Dim TempPath As String
  206.     Dim TempFile As String
  207.     Dim Today As String
  208.     Dim File As TFile
  209.     Dim Start As Long
  210.     Start = Timer
  211.     Today = Now
  212.     ' these are the names of files and folder we will use
  213.     ' in our demo test
  214.     Text1.Text = ""
  215.     Root = Drive & "FileTest"
  216.     Path = Root & "\Demo\Test"
  217.     TempPath = GetPathName(Root) & "\Temporary"
  218.     Filename = "Text.TXT"
  219.     FilePath = Path & "\" & Filename
  220.     TempFile = TempPath & "\" & Filename
  221.     DebugOut "*** Starting tests...", 0
  222.     DebugOut "Windows  : " & FileSystem.GetSpecialFolder(WindowsFolder)
  223.     DebugOut "System   : " & FileSystem.GetSpecialFolder(SystemFolder)
  224.     DebugOut "Temporary: " & FileSystem.GetSpecialFolder(TemporaryFolder)
  225.     DebugOut "*** Calling some functions...", 0
  226.     DebugOut "Testing GetTempFileName() function: " & FileSystem.GetTempFileName(, "rad")
  227.     DebugOut "Testing LocalDateToUTC(Today) function: " & FileSystem.LocalDateToUTC(Today)
  228.     DebugOut "Testing UTCToLocalDate(Today) function: " & FileSystem.UTCToLocalDate(FileSystem.LocalDateToUTC(Today))
  229.     DebugOut vbCrLf
  230.     DebugOut "*** Starting file handling functions...", 0
  231.     DebugOut "FileSystem.CreateFolder(" & Path & ")", 2
  232.     If FileSystem.CreateFolder(Path) Then
  233.         DebugOut ">> Created folder " & Path
  234.         DebugOut "CreateFolder(" & TempPath & ")", 2
  235.         If CreateFolder(TempPath) Then
  236.             DebugOut ">> Created folder " & TempPath
  237.             DebugOut "CreateTextFile(" & FilePath & ")", 2
  238.             hFile = CreateTextFile(FilePath)
  239.             If hFile <> INVALID_HANDLE_VALUE Then
  240.                 DebugOut ">> Created text file " & FilePath
  241.                 DebugOut "CloseFile hFile", 2
  242.                 CloseFile hFile
  243.                 DebugOut "FileSystem.GetFile(" & FilePath & ", File)", 2
  244.                 If FileSystem.GetFile(FilePath, File) Then
  245.                     DebugOut ">> File Information (" & FilePath & ")"
  246.                     DebugOut ">> Name            : " & File.Name
  247.                     DebugOut ">> Path            : " & File.Path
  248.                     DebugOut ">> TypeName        : " & File.TypeName
  249.                     DebugOut ">> Attributes      : " & File.Attributes
  250.                     DebugOut ">> DateCreated     : " & File.DateCreated
  251.                     DebugOut ">> DateLastAccessed: " & File.DateLastAccessed
  252.                     DebugOut ">> DateLastModified: " & File.DateLastModified
  253.                     DebugOut ">> Size            : " & File.Size
  254.                     DebugOut ">> Alternate       : " & File.Alternate
  255.                     DebugOut ">> Directory       : " & File.Directory
  256.                     DebugOut ">> ParentFolder    : " & File.ParentFolder
  257.                     DebugOut ">> DisplayName     : " & File.DisplayName
  258.                     DebugOut ">> Extension       : " & File.Extension
  259.                     DebugOut ">> ShortName       : " & File.ShortName
  260.                     DebugOut ">> ShortPathName   : " & File.ShortPathName
  261.                     DebugOut ">> FullPathName    : " & File.FullPathName
  262.                     DebugOut ">> CompressedSize  : " & File.CompressedSize
  263.                     DebugOut ">> Icon            : " & File.hIcon
  264.                 End If
  265.                 DebugOut "GetFileContentType(" & FilePath & ")", 2
  266.                 DebugOut ">> Content-type of " & FilePath & " is """ & GetFileContentType(FilePath) & Chr(34)
  267.                 DebugOut "FileSystem.MoveFile(" & Path & " & ""\*.*"", AddBkSlash(" & TempPath & "))", 2
  268.                 If FileSystem.MoveFile(Path & "\*.*", AddBkSlash(TempPath)) Then
  269.                     DebugOut ">> Files moved from " & Path & " to " & TempPath
  270.                     DebugOut "FileSystem.CopyFile(" & TempFile & ", " & FilePath & ", True)", 2
  271.                     If FileSystem.CopyFile(TempFile, FilePath, True) Then
  272.                         DebugOut ">> File " & TempFile & " copied to " & FilePath
  273.                         DebugOut "FileSystem.DeleteFile(" & TempFile & ", True)", 2
  274.                         If FileSystem.DeleteFile(TempFile, True) Then
  275.                             DebugOut ">> File deleted " & TempFile
  276.                         Else
  277.                             DebugOut "!! Cannot delete file " & TempFile
  278.                         End If
  279.                     Else
  280.                         DebugOut "!! Cannot copy file " & TempFile & " to " & FilePath
  281.                     End If
  282.                 Else
  283.                     DebugOut "!! Cannot move files from " & Path & " to " & TempPath
  284.                 End If
  285.                 DebugOut "FileSystem.MoveFolder(GetParentFolderName(" & Path & "), AddBkSlash(" & TempPath & "))", 2
  286.                 ' move demo folder to temporary folder
  287.                 If FileSystem.MoveFolder(GetParentFolderName(Path), AddBkSlash(TempPath)) Then
  288.                     DebugOut ">> Folder " & GetParentFolderName(Path) & " was moved to " & TempPath
  289.                 Else
  290.                     DebugOut "!! Cannot move folder " & GetParentFolderName(Path) & " to " & TempPath
  291.                 End If
  292.                 DebugOut "FileSystem.CopyFolder(" & TempPath & ", AddBkSlash(GetParentFolderName(" & Path & ")))", 2
  293.                 ' move demo folder to temporary folder
  294.                 If FileSystem.CopyFolder(TempPath, AddBkSlash(GetParentFolderName(Path))) Then
  295.                     DebugOut ">> Folder " & TempPath & " was moved to " & GetParentFolderName(Path)
  296.                 Else
  297.                     DebugOut "!! Cannot move folder " & TempPath & " to " & GetParentFolderName(Path)
  298.                 End If
  299.                 DebugOut "FileSystem.DeleteFolder(" & Root & ", True)", 2
  300.                 If FileSystem.DeleteFolder(Root, True) Then
  301.                     DebugOut ">> Folder deleted " & Root
  302.                 Else
  303.                     DebugOut "!! Cannot delete folder " & Root
  304.                 End If
  305.                 DebugOut "FileSystem.DeleteFolder(AddBkSlash(" & TempPath & ") & ""*.*"", True)", 2
  306.                 If FileSystem.DeleteFolder(AddBkSlash(TempPath) & "*.*", True) Then
  307.                     DebugOut ">> Folders deleted in " & TempPath
  308.                 Else
  309.                     DebugOut "!! Cannot delete folders in " & TempPath
  310.                 End If
  311.                 DebugOut "FileSystem.DeleteFolder(" & TempPath & ", True)", 2
  312.                 If FileSystem.DeleteFolder(TempPath, True) Then
  313.                     DebugOut ">> Folder deleted " & TempPath
  314.                 Else
  315.                     DebugOut "!! Cannot delete folder " & TempPath
  316.                 End If
  317.             Else
  318.                 DebugOut "!! Cannot create " & FilePath
  319.             End If
  320.         Else
  321.             DebugOut "!! Cannot create " & TempPath
  322.         End If
  323.     Else
  324.         DebugOut "!! Cannot create " & Path
  325.     End If
  326.     DebugOut "*** End of tests", 0
  327.     DebugOut "Elapsed time: " & (Timer - Start) & " secs."
  328.     DebugOut vbCrLf
  329.     DebugOut "--------------------------------------------------", 0
  330.     DebugOut "Thank you for using filesystem module.", 0
  331.     DebugOut "Report bug to marclei@spnorte.com", 0
  332.     DebugOut "--------------------------------------------------", 0
  333. End Sub
  334. Private Sub ShowReadMe()
  335.     Dim BufStr As String
  336.     BufStr = BufStr & "FileSystem Module ReadMe" & vbCrLf
  337.     BufStr = BufStr & "(february, 04 2001)" & vbCrLf
  338.     BufStr = BufStr & "-------------------------------------------------------------------------" & vbCrLf
  339.     BufStr = BufStr & "" & vbCrLf
  340.     BufStr = BufStr & "This demo will create, move and delete folders and files in you hard disk" & vbCrLf
  341.     BufStr = BufStr & "but don't be afraid. It will not harm your computer. The tests will " & vbCrLf
  342.     BufStr = BufStr & "take place at <Drive you choose>\FileTest directory and " & vbCrLf
  343.     BufStr = BufStr & "<Drive you choose>\Temporary directory. This way you can monitor the" & vbCrLf
  344.     BufStr = BufStr & "actions when it is running. Just pick a drive letter and click the" & vbCrLf
  345.     BufStr = BufStr & "<RUN> button. At the end of the demo all test files and folders will be." & vbCrLf
  346.     BufStr = BufStr & "deleted. The best way to understand what is going on is debugging the " & vbCrLf
  347.     BufStr = BufStr & "RunThis() method" & vbCrLf
  348.     BufStr = BufStr & "" & vbCrLf
  349.     BufStr = BufStr & "-------------------------------------------------------------------------" & vbCrLf
  350.     BufStr = BufStr & "Contact the author" & vbCrLf
  351.     BufStr = BufStr & "marclei@spnorte.com" & vbCrLf
  352.     Text1.Text = BufStr
  353. End Sub
  354. Private Sub ListFunctions()
  355.     Dim BufStr As String
  356.     BufStr = BufStr & "FileSystem Module Function List" & vbCrLf
  357.     BufStr = BufStr & "(february, 04 2001)" & vbCrLf
  358.     BufStr = BufStr & "-------------------------------------------------------------------------" & vbCrLf
  359.     BufStr = BufStr & "StripBkSlash()" & vbTab & vbTab
  360.     BufStr = BufStr & "StripLtSlash()" & vbTab & vbTab
  361.     BufStr = BufStr & "AddBkSlash()" & vbCrLf
  362.     BufStr = BufStr & "AddLtSlash()" & vbTab & vbTab
  363.     BufStr = BufStr & "SetCurrentDirectory()" & vbTab
  364.     BufStr = BufStr & "GetParentFolderName()" & vbCrLf
  365.     BufStr = BufStr & "GetFileAttributes()" & vbTab
  366.     BufStr = BufStr & "SetFileAttributes()" & vbTab
  367.     BufStr = BufStr & "FileExists()" & vbCrLf
  368.     BufStr = BufStr & "FolderExists()" & vbTab & vbTab
  369.     BufStr = BufStr & "GetFileName()" & vbTab & vbTab
  370.     BufStr = BufStr & "GetBasename()" & vbCrLf
  371.     BufStr = BufStr & "GetPathName()" & vbTab & vbTab
  372.     BufStr = BufStr & "CreateFolder()" & vbTab & vbTab
  373.     BufStr = BufStr & "DeleteFile()" & vbCrLf
  374.     BufStr = BufStr & "CopyFile()" & vbTab & vbTab
  375.     BufStr = BufStr & "MoveFile()" & vbTab & vbTab
  376.     BufStr = BufStr & "CopyFolder()" & vbCrLf
  377.     BufStr = BufStr & "MoveFolder()" & vbTab & vbTab
  378.     BufStr = BufStr & "DeleteFolder()" & vbTab & vbTab
  379.     BufStr = BufStr & "CreateTextFile()" & vbCrLf
  380.     BufStr = BufStr & "FindFirst()" & vbTab & vbTab
  381.     BufStr = BufStr & "FindNext()" & vbTab & vbTab
  382.     BufStr = BufStr & "GetPictureInfo()" & vbCrLf
  383.     BufStr = BufStr & "GetExtensionName()" & vbTab
  384.     BufStr = BufStr & "OpenTextFile()" & vbTab & vbTab
  385.     BufStr = BufStr & "CloseFile()" & vbCrLf
  386.     BufStr = BufStr & "GetFileContentType()" & vbTab
  387.     BufStr = BufStr & "BuildPath()" & vbTab & vbTab
  388.     BufStr = BufStr & "GetFullPathName()" & vbCrLf
  389.     BufStr = BufStr & "IsReadOnly()" & vbTab & vbTab
  390.     BufStr = BufStr & "IsHidden()" & vbTab & vbTab
  391.     BufStr = BufStr & "IsArchive()" & vbCrLf
  392.     BufStr = BufStr & "IsSystem()" & vbTab & vbTab
  393.     BufStr = BufStr & "IsTemporary()" & vbTab & vbTab
  394.     BufStr = BufStr & "IsCompressed()" & vbCrLf
  395.     BufStr = BufStr & "IsDirectory()" & vbTab & vbTab
  396.     BufStr = BufStr & "GetShortPathName()" & vbTab
  397.     BufStr = BufStr & "GetTempPath()" & vbCrLf
  398.     BufStr = BufStr & "GetTempFileName()" & vbTab
  399.     BufStr = BufStr & "GetSpecialFolder()" & vbTab
  400.     BufStr = BufStr & "FormatFileSize()" & vbCrLf
  401.     BufStr = BufStr & "GetFile()" & vbTab & vbTab
  402.     BufStr = BufStr & "FileInUse()" & vbTab & vbTab
  403.     BufStr = BufStr & "LocalDateToUTC()" & vbCrLf
  404.     BufStr = BufStr & "UTCToLocalDate()" & vbCrLf
  405.     BufStr = BufStr & "**** 46 functions found" & vbCrLf
  406.     BufStr = BufStr & "-------------------------------------------------------------------------" & vbCrLf
  407.     BufStr = BufStr & "Contact the author" & vbCrLf
  408.     BufStr = BufStr & "marclei@spnorte.com" & vbCrLf
  409.     Text1.Text = BufStr
  410. End Sub
  411. Private Sub DebugOut(ByVal Text As String, Optional TabCount As Integer = 4)
  412.     Dim Size As Long
  413.     Text = Space(TabCount) & Text & vbCrLf
  414.     With Text1
  415.         Size = Len(.Text)
  416.         .SelStart = Size
  417.         .SelLength = Len(Text)
  418.         .SelText = Text
  419.     End With
  420. End Sub
  421. Private Sub Form_Load()
  422.     ShowReadMe
  423. End Sub
  424. Private Sub ShowAbout()
  425.     Dim BufStr As String
  426.     BufStr = BufStr & "FileSystem Module" & vbCrLf
  427.     BufStr = BufStr & "(february, 04 2001)" & vbCrLf
  428.     BufStr = BufStr & "-------------------------------------------------------------------------" & vbCrLf
  429.     BufStr = BufStr & "Created by  Marclei V Silva" & vbCrLf
  430.     BufStr = BufStr & "Description Module that re-writes several FileSystemObject functions" & vbCrLf
  431.     BufStr = BufStr & "" & vbCrLf
  432.     BufStr = BufStr & "  Alot of the information contained inside this file was originally" & vbCrLf
  433.     BufStr = BufStr & "  obtained from several authors on the net and most of it has since been" & vbCrLf
  434.     BufStr = BufStr & "  modified in some way." & vbCrLf
  435.     BufStr = BufStr & "" & vbCrLf
  436.     BufStr = BufStr & "Disclaimer: This file is public domain, updated periodically by" & vbCrLf
  437.     BufStr = BufStr & "  Marclei, (marclei@spnorte.com), Use it at your own risk." & vbCrLf
  438.     BufStr = BufStr & "  Neither myself(marclei) or anyone related to spnorte.com" & vbCrLf
  439.     BufStr = BufStr & "  may be held liable for its use, or misuse." & vbCrLf
  440.     BufStr = BufStr & "" & vbCrLf
  441.     BufStr = BufStr & "Declare check Jan 29, 2001. (Marclei, marclei@spnorte.com)" & vbCrLf
  442.     BufStr = BufStr & "  Works fine running on windows NT 4.0, but I have to check" & vbCrLf
  443.     BufStr = BufStr & "  Win 9x platform. This release I am not handling NT security" & vbCrLf
  444.     BufStr = BufStr & "  concerning register values or file access, this is something" & vbCrLf
  445.     BufStr = BufStr & "  I am working on." & vbCrLf
  446.     BufStr = BufStr & "" & vbCrLf
  447.     BufStr = BufStr & "Declare check Feb 04, 2001. (Marclei, marclei@spnorte.com)" & vbCrLf
  448.     BufStr = BufStr & "  First release with 46 public functions and routines" & vbCrLf
  449.     BufStr = BufStr & "" & vbCrLf
  450.     BufStr = BufStr & "NOTES:" & vbCrLf
  451.     BufStr = BufStr & "  (1) Many of these functions and procedures have not been tested hard" & vbCrLf
  452.     BufStr = BufStr & "      so if you find any bug, please send them to marclei@spnorte.com and this" & vbCrLf
  453.     BufStr = BufStr & "      module will be updated and reposted. Thanks!" & vbCrLf
  454.     BufStr = BufStr & "  (2) These functions are not so robust as FileSystemObject but to" & vbCrLf
  455.     BufStr = BufStr & "      acomplish small tasks it is very useful" & vbCrLf
  456.     BufStr = BufStr & "-------------------------------------------------------------------------" & vbCrLf & vbCrLf
  457.     BufStr = BufStr & "Contact the author" & vbCrLf
  458.     BufStr = BufStr & "marclei@spnorte.com" & vbCrLf
  459.     Text1.Text = BufStr
  460. End Sub
  461.