XL: Put Statement Allows Writing Beyond End of FileLast reviewed: September 2, 1997Article ID: Q108385 |
The information in this article applies to:
SUMMARYIn Microsoft Excel, when you use the Put statement in a Visual Basic for Applications procedure, there is no limit to where you can start writing data to a file. Therefore, it is possible to write data well beyond the current end of a file. This behavior is compatible with earlier versions of Visual Basic.
MORE INFORMATIONYou can use the Put statement to place data in a file at a specified location. However, when you write data beyond the end of a file, the gap between the end of file and the starting point of new data is filled with random data. Microsoft provides examples of Visual Basic for Applications procedures for illustration only, without warranty either expressed or implied, including, but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft support engineers can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400. In order to see this behavior, you must first create a sample file. Follow these steps to create a sample file:
For additional information about Working with Random Access Files, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q150700 TITLE : Excel: How to Work with Random Access Files REFERENCESFor more information about the Put statement, click the Index tab in Microsoft Visual Basic Help, type the following text
putand then double-click the selected text to go to the "Put Statement" topic.
|
Additional query words: 5.00 7.00 xl97
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |