Kết quả bao gồm các đại lý và điểm số cuối cùng của người chơi, và cân bằng mới của người chơi. 22. Chương trình sẽ cho phép người chơi để nhanh chóng rõ ràng các kết quả từ bảng tính từ một nhấp chuột của một điều khiển nút lệnh nằm trên bảng tính. | Chapter 7 Error Handling Debugging and Basic File I O Title property AllowMultiSelect property Figure The Open dialog box of the FileDialog object. InitialFileName property FilterIndex property The Open Statement The Open statement is used to read or write data to a file. Table summarizes the type of access and modes or functions available for reading and writing data to a file with VBA. There is also a Binary access type for reading and writing to any byte position in a file as might be done with an image however this technique is beyond the scope of this book. The Open statement requires several arguments including a string that designates the path to a specified file. If the file does not exist then one will be created. The Open statement also requires an access mode Append Binary Input Output or Random and a file number. Optional parameters include an access parameter Read Write or Read Write lock used to restrict operations on the file from other programs and record length specifies the length of the buffer or record . Open C Data For Input As 1 The preceding line opens a file named found at the designated path for input and assigns the file to the file number 1. If the file is not found then one will be created at the designated location with the name . You can open multiple files in your VBA programs but they must be assigned unique file numbers. Microsoft Excel VBA Programming for the Absolute Beginner Second Edition Table Members of the FileSystem Object Member Description ChDir Changes the current directory. ChDrive Changes the current drive. CurDir Returns the current directory path. Dir Returns the name of a file directory or folder that matches a pattern file attribute or the volume label of a drive. EOF End of file. FileAttr The mode used to open a file with the Open statement. FileCopy Copies a file from a source path to a destination path. FileDateTime Returns the date and time that a file was created or last .