Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 8th, 2004, 11:02 AM
Authorized User
 
Join Date: Jun 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel Cell Limitations for UDF

Hello All,

I was wondering if there is a programmatic way to check the limitations on cells.

For example, if you return values as variants, a string of greater than 255 characters will show #VALUE. If you return the same value as a string, the limit is much higher.

I know that the constant is 255 in current versions of Excel, but I want to make sure that if this limit changes in the future, my functions will also work (and automatically take advantage of any increases).

Thanks,
Paul
 
Old November 9th, 2004, 04:48 AM
Authorized User
 
Join Date: Aug 2004
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I guess the way to handle this would be to attempt to insert a gradually increasing size string into the cell and trap any error produced.

 
Quote:
quote:I know that the constant is 255 in current versions of Excel


This is true of Excel 97 but 2000 up will take more (but only display 255 I think ??). Later versions

Have a look at your Excel Help under "limits in Microsoft Excel".


-----------------------
Regards BrianB
Most problems occur from starting at the wrong place.
Use a cup of coffee to make Windows run faster.
It is easy until you know how.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get Excel Cell color populate .NET Framework 2.0 2 March 3rd, 2014 04:25 AM
Excel cell Formating Using C# veeruu C# 5 September 21st, 2011 01:56 PM
excel 2007 vba UDF DavidReese BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3 1 February 24th, 2009 01:10 AM
cell colouring EXCEL crmpicco Excel VBA 2 April 20th, 2005 11:14 AM
Unprotect a cell on Excel camf650 VBScript 2 April 14th, 2004 11:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.