in reply to Excel cell commenting?
sub SetErrorState { my($self) = shift; my($Sheet) = $self->{SHEET}; my($row, $col, $err) = @_; my $range = sprintf("%c%d", ord('A') + $col, $row); my $cell = $Sheet->Range($range); if($err) { $cell->ClearComments(); $cell->AddComment($err); $cell->Comment->{Visible} = 0; $cell->Interior->{ColorIndex} = 6; } else { $cell->Interior->{ColorIndex} = xlNone; $cell->ClearComments(); } }
You might spot the ColorIndex thing - that was a bitch... Excel version dependant and all...
Cheers,
---Lars
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Excel cell commenting?
by monir (Acolyte) on Aug 10, 2004 at 13:55 UTC |