Returning More than 255 Characters from a Text Box or ButtonLast reviewed: November 3, 1994Article ID: Q74386 |
The information in this article applies to:
SUMMARYThere is a limit of 255 characters that can be returned using the GET.OBJECT macro function with a Type_num argument of 12. If you attempt to retrieve more than 255 characters with this function, a #VALUE! error is returned. The macro in the example below allows you to retrieve more than 255 characters.
MORE INFORMATIONThe form of the GET.OBJECT function is:
=GET.OBJECT(type_num,object_id_text,start_num,count_num)For example, the following
=GET.OBJECT(12,"Text 1",1,20)will return the first 20 characters from TextBox 1. The maximum value that the count_num argument can take on is 255. The example below enables you to extend this maximum.
ExampleA1: =FOR("counter",1,MaxNum,255) A2: =GET.OBJECT(12,"Text 1",counter) A3: <perform some action with text here> A4: =NEXT() A5: =RETURN() In cell A1 of the macro above, "MaxNum" should be the number of characters that you would like to retrieve. Each time the loop is executed, 255 characters are returned. The starting position for the characters to be returned changes from 1 to 256 to 511 and so on. The count_num argument can be omitted from the GET.OBJECT function because it defaults to 255.
REFERENCES"Function Reference," version 4.0, pages 154, 202 "Microsoft Excel Function Reference," version 3.0, pages 79, 112
|
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |