View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default checking cell format

First, that code doesn't format a cell, it returns a string with the
desired format. If you then apply that string to a cell, it may or may
not be parsed correctly. To format the cell, you'd want:

cell.NumberFormat = "ddd" & Chr(10) & "mm/dd"

To test the cell, check the .NumberFormat property:

MsgBox cell.NumberFormat = "ddd" & Chr(10) & "mm/dd"

will display True/False in the message box.


In article ,
"Gary Keramidas" <GKeramidasATmsn.com wrote:

if i have code that formats a cell:
Format(cell, "ddd" & Chr(10) & "mm/dd")


how would i test cells to find if the format is applied?