Article ID: 152379 - View products that this article applies to.
This article was previously published under Q152379
This article contains a sample Microsoft Visual Basic for Applications macro (Sub procedure) that copies the text within a text box and pastes it into a spreadsheet.
After following the steps outlined in this article, you should see the text appear in the various cells in column A, starting with cell A1. Each separate cell will contain the text of one text box.
NOTE: In Microsoft Excel 7.0 and earlier, if a text box contains more than 255 characters, numeric data will appear in scientific notation. If the data in the text box is alphanumeric, the cell will only hold the first 255 characters of data. Microsoft Excel 97 and Microsoft Excel 98 can hold a maximum of 32,000 characters per cell.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. To create a text box in Microsoft Excel, follow these steps:
Sample Visual Basic ProcedureBefore working with the sample code, perform the following steps:
Article ID: 152379 - Last Review: October 10, 2006 - Revision: 2.3