Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Why doesn't this color set work?

"It" is set it = activesheet (just so I have a short form). Later in my code
there are these two lines:

it.Cells(i, 13).AddComment "OK"
it.Cells(i, 13).Interior.Color = 13434828

the first one works fine, the second one gives an "application error" and
exits.

I use similar code all over my apps. What is wrong with this example?

Maury
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Why doesn't this color set work?

Can't see anything, works fine for me. What code do you have before it?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Maury Markowitz" wrote in
message ...
"It" is set it = activesheet (just so I have a short form). Later in my

code
there are these two lines:

it.Cells(i, 13).AddComment "OK"
it.Cells(i, 13).Interior.Color = 13434828

the first one works fine, the second one gives an "application error" and
exits.

I use similar code all over my apps. What is wrong with this example?

Maury



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Why doesn't this color set work?

The second line worked ok for me.

Any chance you've protected that worksheet (allowing objects/comments to be
updated)?





Maury Markowitz wrote:

"It" is set it = activesheet (just so I have a short form). Later in my code
there are these two lines:

it.Cells(i, 13).AddComment "OK"
it.Cells(i, 13).Interior.Color = 13434828

the first one works fine, the second one gives an "application error" and
exits.

I use similar code all over my apps. What is wrong with this example?

Maury


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Why doesn't this color set work?

"Dave Peterson" wrote:

The second line worked ok for me.


Urrrg. Ok, thanks for trying guys, I guess it's just one of those mysteries.
No, there's no protection or anything, and you get the generic "application
defined error" (thanks MS!)

Maury
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Why doesn't this color set work?

No, works fine for me, XL2K.
You're not trying to run it on a cell that already has a comment, are you ?
Or i is not a valid row ?

NickHK

"Maury Markowitz" wrote in
message ...
"Dave Peterson" wrote:

The second line worked ok for me.


Urrrg. Ok, thanks for trying guys, I guess it's just one of those

mysteries.
No, there's no protection or anything, and you get the generic

"application
defined error" (thanks MS!)

Maury



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
fill color and font color icons do not work in excel huer59 Excel Discussion (Misc queries) 0 November 29th 07 01:06 PM
Unable to add color to work sheet. Davidb New Users to Excel 8 July 23rd 06 06:09 AM
Fill color doesn't work although font color does. Marco Excel Worksheet Functions 1 May 8th 06 12:44 AM
My fill color and font color do not work in Excel Std Edition 2003 chapstick Excel Discussion (Misc queries) 1 September 11th 05 08:48 PM
fill color doesn't work Judy Excel Worksheet Functions 2 March 13th 05 12:56 AM


All times are GMT +1. The time now is 10:02 PM.

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"