Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default .formula property bug?

I am using some vba which automatically creates a formula in a cell
(it adds successive staterments to the end of an existing formula)
and decided to make it check if the formula length was going to exceed
1,024 characters.

I created a long formula by hand, and in the immediate window typed:

? len(range("A1").formula)

This gave an error, despite the formula being 1,012 characters long.
Changing the formula bit by bit, I found that the above code only
works if the formula is a maximum of 1,000 characters.

Question 1: Is this a bug?

Question 2: How can I check if a formula may exceed 1,024 characters,
if the current length is valid, but checking the length as above gives
an error?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default .formula property bug?

On 31 Dec 2007, 12:42, Khuli wrote:
I am using some vba which automatically creates a formula in a cell
(it adds successive staterments to the end of an existing formula)
and decided to make it check if the formula length was going to exceed
1,024 characters.

I created a long formula by hand, and in the immediate window typed:

? len(range("A1").formula)

This gave an error, despite the formula being 1,012 characters long.
Changing the formula bit by bit, I found that the above code only
works if the formula is a maximum of 1,000 characters.

Question 1: Is this a bug?

Question 2: How can I check if a formula may exceed 1,024 characters,
if the current length is valid, but checking the length as above gives
an error?


Gentle bump..
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default .formula property bug?

The 1024 is based on the R1C1 reference style.

Try testing your potential formula using .formulaR1C1





Khuli wrote:

I am using some vba which automatically creates a formula in a cell
(it adds successive staterments to the end of an existing formula)
and decided to make it check if the formula length was going to exceed
1,024 characters.

I created a long formula by hand, and in the immediate window typed:

? len(range("A1").formula)

This gave an error, despite the formula being 1,012 characters long.
Changing the formula bit by bit, I found that the above code only
works if the formula is a maximum of 1,000 characters.

Question 1: Is this a bug?

Question 2: How can I check if a formula may exceed 1,024 characters,
if the current length is valid, but checking the length as above gives
an error?


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get Property value of class instance by passing string property name [email protected] Excel Programming 2 October 19th 07 05:47 PM
Runtime error 380 - Could not set the list property. Invalid property value. [email protected] Excel Programming 3 February 27th 07 06:35 AM
Runtime Error 380 – Could not set the list property. Invalid property value BernzG[_16_] Excel Programming 2 August 21st 05 10:10 PM
Runtime error 380: Could not set the List property. invalid property value of listbox jasgrand Excel Programming 0 October 6th 04 09:28 PM
setting formula property Ed Stevens Excel Programming 1 September 9th 03 04:59 AM


All times are GMT +1. The time now is 07:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"