ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   clear cell (https://www.excelbanter.com/excel-programming/302846-clear-cell.html)

John Keturi

clear cell
 
I am setting cell formats using the With Selection.Interior
.ColorIndex = 0
.Pattern = xlGray8
.PatternColorIndex = xlAutomatic
? Can I clear the cell value by adding another expression to this?
Thanks



Paul B[_6_]

clear cell
 
John,
Selection.ClearContent

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 97
** remove news from my email address to reply by email **
"John Keturi" wrote in message
news:3IoEc.4181$151.3051@fed1read02...
I am setting cell formats using the With Selection.Interior
.ColorIndex = 0
.Pattern = xlGray8
.PatternColorIndex = xlAutomatic
? Can I clear the cell value by adding another expression to this?
Thanks





JE McGimpsey

clear cell
 
One way:

With Selection.Interior
.ColorIndex = 0
.Pattern = xlGray8
.PatternColorIndex = xlAutomatic
.Parent.ClearContents
End With



In article <3IoEc.4181$151.3051@fed1read02,
"John Keturi" wrote:

I am setting cell formats using the With Selection.Interior
.ColorIndex = 0
.Pattern = xlGray8
.PatternColorIndex = xlAutomatic
? Can I clear the cell value by adding another expression to this?
Thanks


JE McGimpsey

clear cell
 
Note: Should be

Selection.ClearContents

In article ,
"Paul B" wrote:

Selection.ClearContent



All times are GMT +1. The time now is 07:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com