Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default interior color of macro

for my macro "changes" it will compare the last 2 column of the excel sheet
and change the interior color if the 2 values are different. however, if i
delete the last column and run the macro again, the previous interior change
will still be there. i wish to reset the interior color of the row that has
been changed when i run the macro again.how can i do that?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default interior color of macro

Hi Violet,

If you change color of the last 2 cells in a sheet
then you delete the row that both not same in value
Excel just remember that row you deleted and the next
Macro will read that deleted row with other value from
its offset(1,0)...

So you have to read the whole row that last 2.

Then delete 'em in a time.

Regards,

Halim


violet menuliskan:
for my macro "changes" it will compare the last 2 column of the excel sheet
and change the interior color if the 2 values are different. however, if i
delete the last column and run the macro again, the previous interior change
will still be there. i wish to reset the interior color of the row that has
been changed when i run the macro again.how can i do that?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default interior color of macro

You can add a line at the beginning of your macro to select the range that
includes the two columns and use something like

MyRange.Interior.ColorIndex = xlColorIndexNone

That will reset all of the cells in those columns.

"violet" wrote:

for my macro "changes" it will compare the last 2 column of the excel sheet
and change the interior color if the 2 values are different. however, if i
delete the last column and run the macro again, the previous interior change
will still be there. i wish to reset the interior color of the row that has
been changed when i run the macro again.how can i do that?

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
Macro to set cell interior color? imoose Excel Discussion (Misc queries) 4 July 8th 08 11:36 PM
No Interior Color Macro simplymidori[_2_] Excel Discussion (Misc queries) 1 April 11th 08 05:01 AM
Cell background color (interior color) setting not working Martin E. Excel Programming 1 May 21st 06 07:00 PM
Conditional Format Macro fails to set interior color - HELP!!! bttman Excel Programming 0 April 1st 06 02:22 AM
Interior Color Macro Phil H[_2_] Excel Programming 4 March 10th 06 10:29 AM


All times are GMT +1. The time now is 09:44 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"