![]() |
checking cell format
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? -- Gary |
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? |
checking cell format
ok, thanks je
-- Gary "JE McGimpsey" wrote in message ... 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? |
All times are GMT +1. The time now is 07:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com