Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 8th, 2004, 11:02 AM
Authorized User
 
Join Date: Jun 2003
Location: , , .
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
Reply With Quote
  #2 (permalink)  
Old November 9th, 2004, 04:48 AM
Authorized User
 
Join Date: Aug 2004
Location: , , .
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


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



All times are GMT -4. The time now is 12:40 AM.


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