View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
david mcritchie david mcritchie is offline
external usenet poster
 
Posts: 691
Default Color index values

Hi Doug,
This should look familiar:
It would be looking for a whole number not something with a decimal
fraction. And long works faster than 2 byte integer anyway -- at least
that's what I think I've read in the newsgroups.

Long Data Type
Long (long integer) variables are stored as signed 32-bit (4-byte)
numbers ranging in value from -2,147,483,648 to 2,147,483,647.
The type-declaration character for Long is the ampersand (&).


Double Data Type
Double (double-precision floating-point) variables are stored as
IEEE 64-bit (8-byte) floating-point numbers ranging in value
from -1.79769313486231E308 to -4.94065645841247E-324
for negative values and from 4.94065645841247E-324 to
1.79769313486232E308 for positive values.
The type-declaration character for Double is the number sign (#).
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Doug Glancy" wrote in message ...
Could you expand on the Dimension comment? I actually Dimensioned as a
Double, not Integer, although normally I would have done a Long, but I
thought I read a post somewhere that Double was more efficient since it was
native.

As Pikus said earlier today "learn the basics and then you won't be
confused."

!

Doug

"David McRitchie" wrote in message
...
Hi Doug,
If that is a question, 56 colors in the palette in all current versions of

Excel.

As far as the future goes use Dimension as long instead of integer,
then if Excel is changed you'll be in better shape.

HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm


"Doug Glancy" wrote ...
Sure. Until I wrote it I didn't know how many colors there were. Plus,

I
didn't know if there were more colors in later versions than my xl2000.

Doug

"pikus " wrote in message
...
I prefer

For x = 1 To 56
Cells(x, 1).Interior.ColorIndex = x
Next x

- Pikus


---
Message posted from http://www.ExcelForum.com/