![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 34
|
can anyone tell me why
Application.Goto reference:="DOCUMENTS" With Selection.Interior .ColorIndex = 40 .Pattern = xlSolid End With won't work when Application.Goto reference:="DOCUMENTS" With Selection.Interior .ColorIndex = 3 .Pattern = xlSolid End With does work? It's a from of error checking. Highlights an area in red if the values are incorrect, but I need to set it back to clear via an initialisation sub. I tried xlColorIndexNone, but that doesn't work either. I get error 1004 - unable to set the ColorIndex of the interior class. |
|
|
|
|
|
#2 |
|
New Member
Join Date: Mar 2002
Posts: 39
|
To set it back to clear use
Application.Goto reference:="DOCUMENTS" With Selection.Interior .ColorIndex = xlnone .Pattern = xlnone End With Russell |
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Posts: 34
|
ok, I tried that, but get same error message, but also the value of xlNone is now -4142 at the code break point. Is that correct?
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sunny, spring-like Hull
Posts: 3,339
|
Does xlColorIndexAutomatic work?
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|